Welcome Guest, Not a member yet? Register   Sign In
Simply add field an existing form how to please
#1

I had a little app dumped on me that was created using Codeignighter.  After I got the App working on the server they tell me "This was just a proof of concept now we need it jump through hoops o-flame and do back flips off the high dive into a shot glass."

After light coding with PHP for 15 years I have no idea what is going on in Codeignighter code. 

All I want to know for now is to add one field to a form that exists and have it processed just like the fields already in the form. Which successfully write a database.

How please & simple on my dumb old frustrated thinky brain. Huh
Thanks
Reply
#2

Look at your original form and copy one of the form fields, changing any names or ID's etc. Or add a perfectly standard HTML form element to the form.

The form is generated from a view, the views are in the views folder. The view is called from a controller usually which you will find in the controllers folder. The controller is usually called via the url with domain_name/controller/method or you might have to check the routes file in case they are using routes to match a url to a controller.

Then when you have your additional field, go to the controller that manages the page and find the form validation rule set. Copy one of the rule sets to an additional one and change the name and the rules.

Then in the controller (or model or library) that manages the input, do whatever you need for it.

CI is a light framework that is super easy to learn. Perhaps you could spend a little while learning it. If they are saying this is a proof of concept, then usually that means it is shoddy short cut code that is not implemented properly. I would be extremely wary of using it in a production environment.
Reply
#3

(10-09-2016, 03:37 AM)PaulD Wrote: Look at your original form and copy one of the form fields, changing any names or ID's etc. Or add a perfectly standard HTML form element to the form.

The form is generated from a view, the views are in the views folder. The view is called from a controller usually which you will find in the controllers folder. The controller is usually called via the url with domain_name/controller/method or you might have to check the routes file in case they are using routes to match a url to a controller.

Then when you have your additional field, go to the controller that manages the page and find the form validation rule set. Copy one of the rule sets to an additional one and change the name and the rules.

Then in the controller (or model or library) that manages the input, do whatever you need for it.

CI is a light framework that is super easy to learn. Perhaps you could spend a little while learning it. If they are saying this is a proof of concept, then usually that means it is shoddy short cut code that is not implemented properly. I would be extremely wary of using it in a production environment.


GarySeven says
Thanks PaulD I was able to get my new form field to write to the database fairly quickly using your instruction. Unk, me feeling better in cognitive faculties. Looking at the introduction description this system make no sense to me. If I get time I will take the beginners approach and learn what I can. Thanks again.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB