I'm having a little trouble, i need a dummies guide!
I have a form that a Joomla (v3.8.1 with CF 5.0.16) user can fill out and save into the database following details:
Company - (pre populated drop down menu)
Contact name - (txt box)
Contact Phone - (txt box)
Email - (txt box)
number of teams - (pre populated drop down menu)
Notes - (txt area)
Year- Hidden text field that has a year number already populated
If a user (not necessarily the same one) comes to the form but using the same company name, i want it to read the data from the database and re-populates the drop down menu and text boxes with the values they can then alter, resubmit and it will update that DB record.
Basically if I'm not making it too difficult to understand, I want it so each company can have 1 record for each Year (the hidden text field)
I tried following the PDF attached to the below thread but i couldn't get adapt it to work how i want, not really being a programmer i don't understand the code very well:
I'd really appreciate some help
There are a couple of ways to do this but the simplest is probably to make this a multi-page form. On the first page have just the Company name drop-down and a submit button. When that submits use an Event Switcher action to check if there is an existing record and show either the form or a 'sorry, you've already completed this' message.
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
IF there is already a record for a company i dont want to exclude them, i just want them to be able to pre populate the form with the details for that company which user can then edit if required.
OK - similar process but instead of an Event Switcher use a DB Read action to load the saved data.
Thanks again, sorry for asking the dummy questions still
I got a DB Read and using the debugger it seems to be reading the data into "somewhere" how do i get it to enter the data read into the text boxes/combo boxes?
Provided that that the input names match the names of the data items CF will auto-load the values. The Model ID can get in the way of this - either you need to include that in the input names as e.g. model_id[input_name] or you leave the Model ID empty in the DB Read - just make sure that this does not cause any conflicts.
There is another complication if you have multi-choice select or check-box groups when you need to have some custom code to convert data saved as strings back to arrays.
2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com