I have got a form which uploads an existing record. In edit mode the checkbox can’t save changes. Can you help me?
Which Chronoforms version ? does the checkbox have the ghost setting enabled ? what is the value assigned to the checkbox ?
If your main question got answered then please mark the answer using the button!
Chronoforms version V5
The ghost settong are disabled and the field value is S
So when you checkbox is "checked" and you save the form, no value is saved ?
In general the ghost setting should be enabled.
the first time the value S is saved.
when I reload the record the changement is not saved.
so to be more precise
My checkbox configuration is the following
filed name: att1
Filed ID: att1
Field value: S (I saw that if the checkbox is checked in the database field, the “S” value is saved)
cheched : NO
in the “events” file:
on check show parent att1desc (if checked it shows a box for description)
on unchek hide parent att1desc (if unchecked it hides the box for description)
I fill in the form for the first time, I check the checkbox and the value “S” is saved in the table field.
I upload the filled and saved form again to edit any changes. (I obviously load it on a form which is completely identical to the first one)
I use the DB read command with the following code:
$user = JFactory::getUser();
return array('user_id' => $user->id);
then the form which I had filled in previously is reloaded (see the attached screenshot)
I find all the data I inserted
The checkbox (att1) is checked as it should be.
Now if I deselect and save the form (always in the same table) the changes aren’t saved.
In other words, uploading the form again the checkbox would turn out to be as it was at the very first insertion, that is it is checked.
The ghost must be enabled and its value must be set to an empty string, is this how its setup in your form ?
This was the problem.
I solved : setting property ghost = enable
setting property ghost value = empty
thank you Max
2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com