Forums

Chronoforms + User Form Layout

tiffgrooves 07 Oct, 2009
I am using Chronoforms to customize the registration process. This works to register a new user so that they can login using the details they provided in the customized form. What I'm going crazy trying to figure out (I've searched this forum for hours) is how to link up the option to edit a user's information given in the registration form after the fact. Adding the menu item type User Form Layout (under Users), I can get a registered user to a page that only provides the details in the jos_users table. I've tried linking the tables using the Profile Page plugin on the forms management tab, but beyond building the relation (which I think works) I am sooooo stuck and I'm going crazy losing hours trying to figure this out.

Every forum topic I read that seems to have the answer to my question tells me to search the forum for the getUser() function. The problem is when I search for this I get dozens of posts telling me there are many, many examples on how to use this - but no actual expamples. I get that it would be extremely frustrating explaining the same thing over and over, but I am seriously stuck here. Any direction, link, etc I could receive would be oh so greatly appreciated!!!

Thanks in advance!
GreyHead 07 Oct, 2009
Hi tiffgrooves,

The Joomla $user object will give you the info from the jos_users table. You presumably have saved the extra information in some other table like 'jos_chronoforms_users'

Create a new form using the profile plugin to link to the jos_chronoforms_users table. And in the form html use getUser to load the Joomla User Object.

Between the two you now have all your user info available to the form. Presumably you will want to make some data editable and other field viewable only or hidden. Buil dyour form setting the appropriate values as you go. As ever start simple with just few fields and get it working as you want before adding all the rest.

On Submit the jos_chronoForms_users info should be updated OK - provided that you have the cf_id in your form.

You will need to add extra code to update the jos_users table if you have made any of those fields editable.

Bob
tiffgrooves 22 Oct, 2009
Thank you very much for your response. I managed to get the jos_users table linked in and displaying data. What I can't figure out--though I'm sure it has to be the easiest part--is how to display the data from my custom Chronoforms table. The manager shows that it's been linked. What code do I use to display the field contents in a way that it can be edited and overwritten?

Thanks again for all your help and work on this product. Greatly appreciated.
GreyHead 22 Oct, 2009
Hi tiffgrooves,

The Profile Plugin is the easiest way.

Bob
tiffgrooves 29 Mar, 2010
Me again. 😶

I'm having an odd problem. I was finally able to figure out how to use the profile page plugin, but I'm having a bit of a problem displaying data. Anything with a space in the field is cutting off. My code for the address field looks like:

<label class="cf_label" style="width: 125px;">Address 1: </label>
<input class="cf_inputbox required" maxlength="150" size="30" id="text_13" name="address_1" value={address_1} >


So if the address in the database was "123 N Main St", I am only displaying "123".

Any ideas what I'm doing wrong?
GreyHead 29 Mar, 2010
Hi tiffgrooves,

Looks like you need quotes around the values value="{address_1}"

Bob
This topic is locked and no more replies can be posted.