Forums

Odd behavior with profile page - possible bug

spletcher 25 Jun, 2011
I am using the profile page to do an edit for a form I am creating. I am using v3.2 of chronoforms

I am using the unique id of the table (this one is not cf_id), however is an id.

I am getting sporatic results in the following fashions:

1. With only one id am I getting results showing - for instance
http://christianeye.net/index.php?option=com_chronocontact&chronoformname=practice_info_short&practiceid=104 gives me the results

However with
http://christianeye.net/index.php?option=com_chronocontact&chronoformname=practice_info_short&practiceid=105 - everything is blanked out despite no obvious difference in the data

2. Also, I am using the following in my code to display the value: value="<?php echo {practicename}; ?>"

However, when I populate all of my fields with the appropriate value php code for the field, for undetermined reasons, the form will also completely blank out if I open the form (this occurred even if the profile page wasn't active.)
For instance: http://christianeye.net/index.php?option=com_chronocontact&chronoformname=practice_info_backup

Any thoughts or is this just a bug?

Thanks ahead of time

Stan (longterm chronoform user)
GreyHead 25 Jun, 2011
Hi Stan,

I don't think this syntax will work value="<?php echo {practicename}; ?>" For the profile page plug-in I think you just need {practicename} with no input tag at all if you want to display the data; or value="{practicename}" if you want the form to be editable.

Please try this and see if that also gets rid of the variability between ids - I don't immediately see why that would happen if the ids are valid.

Bob
spletcher 25 Jun, 2011
Wow - Bob, as always you are right on the money!

This worked perfectly to put in the form code value="{practicename}" instead of the php value referenced above.

Any suggestions what code to use to populate the radio buttons, dropdowns and textareas in the form in order to edit them?

Thanks,

Stan
spletcher 25 Jun, 2011
Actually what I discovered is that none of this value code is necessary at all, if you simply click "editable" = yes on the profilepage. Not only that, but the radiobuttons, checkboxes and textareas all populate like magic. If "editable" is checked no in profile page, then only the fields that I had specified a value shows up.

Now I just need to figure out how to edit the same id rather than start a new record. I think the answer for this is to place the hidden field id in the code like has been suggested in other posts.
This topic is locked and no more replies can be posted.