Hello everyone!
I created a form for editing data previously entered on db (again via form)
I would make sure that the fields of the form (editing) are filled with the values on db.
I created a url like: index.php?name_form form=&field1=&field2=1 and the form fields with the same names.
The form is completely filled with the right values.
But if I modify them and hit submit nothing happens on the db!
If the url does not pass any value, value is empty and properly update the fields ...
why?
Hi iacoposk8,
Which version of ChronoForms are you using? You can find the version from Site Admin | Extensions | Install/Uninstall | Components in Joomla! 1.5 or Site Admin | Extensions | Extension Manager | Manage in Joomla! 1.6/1.7/2.5.
Bob
Hi iacoposk8 ,
If you use a DB Record Loader in the ON Load event (drag it before the Show HTML action) then ChronoForms will pre-populate any inputs with matching names. You need to include the prinary key column from the table in a hidden input.
You then need a DB Save action in the form On Submit event to save the edited data.
Bob
If I have:
text field named "singer"
text field named "number of cd"
etc.
and create a url like:
index.php?option=com_chronoforms&chronoform=name_form&cf_id=12
fields are empty.
if it creates a url like:
index.php?option=com_chronoforms&chronoform=name_form&cf_id=12&singer=boh&number_of_cd=5
I see the fields filled in correctly but if I press "submit" in the database is the text contained in "value" and not what I have inserted
Hi iacoposk8 ,
Please take a Form Backup using the icon in the Forms Manager and post it here (as a zipped file) or PM or email it to me and I'll take a closer look.
Bob
thank you so much for the availability
You're very kind🙂
Hi iacoposk8,
Thanks for the form backup. I've looked at it but I have no idea at all what the form is trying to do.
If you want to edit a record then you probably want the DB Record Loader action (not the DB Multi Loader) to load a single record. The action in your form has no configuration settings so I can't work out what should be passed in the URL.
The custom code that you have tries to echo $form->data['details'] but fails because that entry doesn't exist in the $form->data array.
Bob
if you want I can give you new information, to help me🙂