I run a Joomla 1.0/CB 1.1 members-only site and now am implementing ChronoForms (latest version) to gather information from users.
So I've written up a form which works fine -- users can type their answers, make their choices, hit send, and it all gets e-mailed to me and logged so it's downloadable. So ChronoForms is working fine.
What I can't figure out - and can't find any tutorials to help me - is how to automatically grab CB fields. Actually only one -- I just want their Name! They are already logged into my site (since it's members-only) so I just want to know who is sending the form, and I want it to be their true full name as recorded in CB.
I already went to the main ChronoForms page, selected my form, and clicked CB Registration. It gave me a list of fields (CB fields), so next to Name field, I filled in "CB_Name" hoping that CB_Name would then turn up in the submissions.
I also clicked on my form, clicked Edit, and on the Plug-ins tab, enabled CB Registration. I also gave it order #1.
This is all just a guess -- I don't know where the real instructions are.
In any case, it doesn't work. Submissions get sent from the site, but do not contain the CB full name.
So how do I do this? I know I'm close.π
Hi,
you can use the profile plugin in this case, before we can move forward, whats the "name" field is called in your CB config ?
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
The name field is simply "name".
Do I use the Profile plugin or the CB Registration plug-in?
Once I activate the Profile plugin, what do I enter for table name, request parameter name, and target field name?
Then, how do I get that info to be logged in both the e-mails that are auto-sent, and in the table database?
Hi,
#1- the profile plugin
#2- select the jos_comprofiler table and leave the Request name empty and at the target field name select
id or
user_id, i'm not sure of the field name in the jos_comprofiler table!
#3- just add a hidden field to your form and add the {name} which will get the name value of the logged in user:
<input type="hidden" value="{name}" name="name">
Regards
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Tried it, but unfortunately it doesn't work. In the results, all I see is {Name} (with the curly brackets) and not the true user name.
I tried both id and user_id as the target field name. Tried a few other things too. None of these work.
And yes, I did make sure the profile plug-in was enabled in the form.
(BTW this is Joomla 1.0.18, CB 1.2.)
indeed I don't think the name field in the jos_comprofiler is called only "name" , i remember it was always cb_something, this is case sensitive too, can I see a screenshot for the jos_comprofiler table structure ?
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Hi,
jos_comprofiler has no 'name' field - it does have 'firstname', 'middlename', and 'lastname'
Bob
Hi Bob,
Thank you, I was also thinking its a bit strange to have only "name" in the CB table!π
Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Thanks Bob and Greyhead. I have searched and I can't find the true place where names are stored.
I don't believe that firstname, middlename, and lastname are right. They do exist in my database, but I think CB 1.2 might have automatically added them when I upgraded from 1.1, because I've never used those fields in 1.1. (I only upgraded from 1.1 to 1.2 a couple of days ago.) I've always let the user simply enter their full name in one field. So I'm pretty sure that firstname, middlename, and lastname would not contain complete data.
For the life of me, I can't figure out where CB is storing "name". I've looked in all the obvious places.
I've attached screenshots of my jos_comprofiler_xyz databases, and of my field list. Any help is GREATLY appreciated!
Is there any chance CB is storing it in a non-jos_comprofiler area?
Update! I think I found it! Inside jos_users I see a "name" field that does appear to have a lot of names in it. phpMyAdmin doesn't tell me the total number of names, but it does show me a large number.
Theory: is CB writing these to jos_users so that Joomla recognizes those users (i.e. fools Joomla into thinking they are Joomla users)? For example, when I log into the admin panel of my site, on the right side is a full list of everyone logged in at the moment. So maybe CB writes the users names in this field so as to trick Joomla into thinking they are part of the core Joomla database of users for login purposes.
Hi,
I just tried to fill in jos_users and "name"
where ???
you need to choose in the profile plugin "jos_users" and use "id" in the "field name" and then it will work!π
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
It works! Thank you so much!
(I was filling in "name" in the field name and it wasn't working, but once I changed that to "id" it worked fine.)
Would it help anyone if I wrote this up cleanly to be posted as a FAQ? I would have thought this would be a fairly common implementation of ChronoForms.
Hi, Glad that helped and sure it will help much if you told this in details and posted it here or sent me the file!π
Kind regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Feel free to copy and paste this (and edit it if necessary) as a FAQ item.
INSTRUCTIONS ON DESIGNING A CHRONOFORMS FORM THAT AUTOMATICALLY GRABS THE USER'S NAME FROM COMMUNITY BUILDER
Tested on a Joomla 1.0.15 site running Community Builder 1.2 and ChronoForms 2.3.9.
Design your form as usual, and in the Form Code tab, inside Form HTML, that's where you write the raw HTML for your form. Somewhere in the form, you must insert:
<input name="name" type="hidden" value="{name}" id="name" >
This will not be seen by the end user.
In the Plugins tab for your form, enable "Profile Page" and give it order "1".
Then in the main ChronoForms page (your form manager), put a checkbox beside your form, and click Profile Page on the left side. You should fill in:
Table name: jos_users
REQUEST Parameter name: (leave blank)
Target field name: id
Save, and that's it!
Note: if a guest comes to your site, or your user isn't logged in, this will not work. I run a members-only site, but provided the direct form link to my members via an e-mail, and found that members clicked on the link in the e-mail, and if they weren't logged in, the form would work but of course would not fill in their name. For this reason, you may want to take the additional step of not sending out the URL of the form, but only posting it in a place where Registered users can see it - this would insure that the form will always grab the name from CB.
Ah, now you tell me.π
Thanks Bob!
Hi altoidboy,
Sometimes you don't know where you are going until you get there!
If you need data from CB then your method is great.
Bob