DMXzone Database Updater PHP Support Product Page

Solved

edit record - with radio button group

Reported 25 Mar 2014 03:43:37
1
has this problem
25 Mar 2014 03:43:37 Hope Tillman posted:
The radio button group populates the record display but it does not fill in when calling up the record to be edited (and the text fields do fill in). When I click on "Make Changes" that record disappears and looking at the file in my database the radio button field changes to "0". I cannot find any examples to follow. Please take a look at this and advise.
www.msoginc.org/surname_project/edit0324.php

Thank you

Replies

Replied 25 Mar 2014 10:13:39
25 Mar 2014 10:13:39 Teodor Kuduschiev replied:
Hello,
This is a bit specific for different cases. In your case you should change:

data-binding-value="{{centuryLabel}}"


to
data-binding-checked="{{centuryLabel == 17th}}"
data-binding-checked="{{centuryLabel == 18th}}"
...

etc.. for each of the radio buttons.
Replied 26 Mar 2014 03:30:15
26 Mar 2014 03:30:15 Hope Tillman replied:
I made that change. Now nothing populates the record display. I verified that the display shows when just the text fields are there but when I added the radio group, it no longer displays:

www.msoginc.org/surname_project/edit0325.php

What else am I missing? Thank you for your help.
Replied 26 Mar 2014 07:56:08
26 Mar 2014 07:56:08 Teodor Kuduschiev replied:
Hello,
It seems the issue is caused by the fact your values are not numbers only: 17th, 18th.. etc
Please change the data-binding-checked.. to:
data-binding-checked="{{centuryLabel == '17th'}}" 
data-binding-checked="{{centuryLabel == '18th'}}" 
...

This should fix your issue.
Replied 26 Mar 2014 14:06:09
26 Mar 2014 14:06:09 Hope Tillman replied:
Thank you. It displays now. Now I'll work on getting the edit part of this to work to make changes.
Replied 10 Apr 2014 03:41:15
10 Apr 2014 03:41:15 Hope Tillman replied:
I have a second field using radio buttons and tried the same technique with the data-binding-checked="{{field == 'value'}}"
I followed the instructions for the retrieve and use identity of an inserted record video.

Unfortunately it does not appear to work where the centuryLabel solution was successful. When I click the "Make Changes" button on the page, that record stops showing, as the value for the Century becomes "0"

The file is at: www.msoginc.org/surname_project/editcounty.php

Reply to this topic