Buy Now
Sign in

Edit checkbox for saved record

fanciullo , June 25 2017
Answered
F
fanciullo
I have got a form which uploads an existing record. In edit mode the checkbox can’t save changes. Can you help me?
thank you
admin
Hi fanciullo,

Which Chronoforms version ? does the checkbox have the ghost setting enabled ? what is the value assigned to the checkbox ?

Best regards,
Max
Max
If your main question got answered then please mark the answer using the button!​
​Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
F
fanciullo
hallo Max,
Chronoforms version V5

The ghost settong are disabled and the field value is S

thank you
admin
Hi fanciullo,

So when you checkbox is "checked" and you save the form, no value is saved ?

In general the ghost setting should be enabled.

Best regards
Max
Max
If your main question got answered then please mark the answer using the button!​
​Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
F
fanciullo
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)
ghost enable
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:
<?php
$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.

Thank you
admin
Hi fanciullo,

The ghost must be enabled and its value must be set to an empty string, is this how its setup in your form ?

Best regards,
Max
Max
If your main question got answered then please mark the answer using the button!​
​Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
F
fanciullo
This was the problem.
I solved : setting property ghost = enable
setting property ghost value = empty

thank you Max