However, I have not found how one codes this in order to repopulate a radiobox, checkbox, dropdown or textarea.Thanks,Stan"> populating radio buttons or dropdowns or textarea [SOLVED] - Forums

Forums

populating radio buttons or dropdowns or textarea [SOLVED]

spletcher 25 Jun, 2011
I have learned from this forum how to populate a form using the profile page so that a user can edit his entries.

I am using the following code:

<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 150px;">Practice Name</label>
<input class="cf_inputbox required" maxlength="150" size="30" title="" id="text_2" name="practicename" value="<?php echo {practicename}; ?>" type="text" />

However, I have not found how one codes this in order to repopulate a radiobox, checkbox, dropdown or textarea.

Thanks,

Stan
spletcher 25 Jun, 2011
Bob helped me fix this by showing that I just need value = "{fieldname}" rather than the php code in the form.

The checkboxes and radiobuttons and textfields all populate if you simply place "editable = yes" in the profile page. In this case, you do not need the code above at all in your form. It simply populates.
GreyHead 25 Jun, 2011
Hi Stan,

You don't need to do anything to get these elements to re-load. I just ran a test as I couldn't remember :-(

You don't even need the value = "{fieldname}" - ChronoForms parses the Form HTML and adds the necessary values to redisplay the saved data.

You do need to set Editable to 'Yes' in the Plug-in Configuration.

Bob
spletcher 25 Jun, 2011
Bob,

Yes - I figured that out, in fact, that is what I was trying to say in my last sentence that you don't even need that code. Thanks for all of this help. Hopefully this will be clear to anyone else working on this type of a situation as well.
This topic is locked and no more replies can be posted.