field values disappearing in CB Registration plugin

chriscaple 04 Jun, 2009
Hi - I'm using Joomla 1.5.10, ChronoForms V3.1_RC5.1, Community Builder 1.2. I'm trying to create a custom registration form. I set up the form using the form wizard. I selected it and clicked on the "CB Registration" link on the plugins menu on the left of the screen. I filled in the matching values in the "General" tab. Saved it. If I then go back into the plugin, only the first seven values are there - name, username, email, password, verify password, and email user/admins. All the rest are now blank. If I retype the correct info in the blank fields, save again, then come back into it again, same thing. Everything after the first seven is blank.

Any idea why?

PHP 5.2, MySQL 5.2.
chriscaple 05 Jun, 2009
It cuts out at the "middle name" field, which I left blank because I don't have that in my custom form.

I should probably have posted this in the "bugs" forum - sorry.
GreyHead 05 Jun, 2009
Hi chriscaple,

If the field is called 'middle name' then that is the problem - spaces are not allowed in field names, change it to middle_name and see if that fixes your problem.

chriscaple 05 Jun, 2009
Hi Bob,

I think I didn't explain it right - maybe this screengrab will help:

See? The CB middlename field is showing up there, which is weird, because I don't have it on the form I created. I'm just using firstname and lastname. So... I leave the middlename thing blank, and when I come back... everything below it is blank as well.

I guess the actual question here is why is the CB registration plugin calling up a "middlename" field when I don't have one on the registration form I created in the form wizard?
GreyHead 05 Jun, 2009
Hi chriscaple,

Please will you psot a copy of the Form HTML - or a backup copy of the whole form - which ever is simpler.

bek 05 Jun, 2009
I also seem to have this problem when trying to get the Community Builder plugin to work. My inputs (without spaces) in the CB Registration plugin fields seem to disappear after I've hit save and re-opened it, and they don't appear to be replacing the fields in the cb registration. I haven't created any fields to replace the basic Community Builder ones such as name, username, passwords etc. as I'm just looking to have some custom scripted fields added on to the current registration form. Is this possible or do all CB fields need to be replaced with Chronoforms ones in order to work?

A couple of other questions:
1. is it possible to have chronoforms fields/entries appear only in the CB profile tabs instead of displaying at registration? I noticed that only the cb fields that are enabled for registration appear in the CB Registration plugin list.
2. will Chronoforms fields still be available in CB's custom/criteria search?

I am using CB 1.2.1 with Joomla 1.5.10 and currently using the free version of the chronoforms, however i would be happy to purchase and make contribution if i can get it to do what I need.
GreyHead 05 Jun, 2009
Hi bek,

I've no idea why the fields disappear :-(

For the rest - ChronoForms knows nothing about CB - if you want extra CB fields then they have to be created in CB and ChronoForms will then save data to them. Where and how they are displayed is entirely in CB's hands.

chriscaple 05 Jun, 2009
Hi Bob,

Here you go - form code -
<input type="hidden" name="name" value="" />
<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">First Name:</label>
    <input class="cf_inputbox required" maxlength="150" size="30" title="" id="text_0" name="firstname" type="text" />
  <div class="cfclear"> </div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">Last Name:</label>
    <input class="cf_inputbox required" maxlength="150" size="30" title="" id="text_1" name="lastname" type="text" />
  <div class="cfclear"> </div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">Email:</label>
    <input class="cf_inputbox required validate-email" maxlength="150" size="30" title="" id="text_2" name="email" type="text" />
  <div class="cfclear"> </div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">Username: </label>
    <input class="cf_inputbox required" maxlength="150" size="30" title="" id="text_3" name="username" type="text" />
  <div class="cfclear"> </div>

<div class="form_item">
  <div class="form_element cf_password">
    <label class="cf_label" style="width: 150px;">Password:</label>
    <input class="cf_inputbox required" maxlength="150" size="30" title="" id="text_5" name="password" type="password" />
  <div class="cfclear"> </div>

<div class="form_item">
  <div class="form_element cf_password">
    <label class="cf_label" style="width: 150px;">Verify Password:</label>
    <input class="cf_inputbox required" maxlength="150" size="30" title="" id="text_6" name="passwordverify" type="password" />
  <div class="cfclear"> </div>

<div class="form_item">
  <div class="form_element cf_dropdown">
    <label class="cf_label" style="width: 150px;">Country:</label>
    <select class="cf_inputbox validate-selection" id="select_8" size="1" title=""  name="country">
    <option value="">Choose Option</option>
      <option value="Afghanistan">Afghanistan</option>
<option value="Albania">Albania</option>
<option value="Algeria">Algeria</option>
<option value="Andorra">Andorra</option>
<option value="Angola">Angola</option>
<option value="Antigua & Deps">Antigua & Deps</option>
<option value="Argentina">Argentina</option>
<option value="Armenia">Armenia</option>
<option value="Australia">Australia</option>
<option value="Austria">Austria</option>
<option value="Azerbaijan">Azerbaijan</option>
<option value="Bahamas">Bahamas</option>
<option value="Bahrain">Bahrain</option>
<option value="Bangladesh">Bangladesh</option>
<option value="Barbados">Barbados</option>
<option value="Belarus">Belarus</option>
<option value="Belgium">Belgium</option>
<option value="Belize">Belize</option>
<option value="Benin">Benin</option>
<option value="Bhutan">Bhutan</option>
<option value="Bolivia">Bolivia</option>
<option value="Bosnia Herzegovina">Bosnia Herzegovina</option>
<option value="Botswana">Botswana</option>
<option value="Brazil">Brazil</option>
<option value="Brunei">Brunei</option>
<option value="Bulgaria">Bulgaria</option>
<option value="Burkina">Burkina</option>
<option value="Burundi">Burundi</option>
<option value="Cambodia">Cambodia</option>
<option value="Cameroon">Cameroon</option>
<option value="Canada">Canada</option>
<option value="Cape Verde">Cape Verde</option>
<option value="Central African Rep">Central African Rep</option>
<option value="Chad">Chad</option>
<option value="Chile">Chile</option>
<option value="China">China</option>
<option value="Colombia">Colombia</option>
<option value="Comoros">Comoros</option>
<option value="Congo">Congo</option>
<option value="Congo {Democratic Rep}">Congo {Democratic Rep}</option>
<option value="Costa Rica">Costa Rica</option>
<option value="Croatia">Croatia</option>
<option value="Cuba">Cuba</option>
<option value="Cyprus">Cyprus</option>
<option value="Czech Republic">Czech Republic</option>
<option value="Denmark">Denmark</option>
<option value="Djibouti">Djibouti</option>
<option value="Dominica">Dominica</option>
<option value="Dominican Republic">Dominican Republic</option>
<option value="East Timor">East Timor</option>
<option value="Ecuador">Ecuador</option>
<option value="Egypt">Egypt</option>
<option value="El Salvador">El Salvador</option>
<option value="Equatorial Guinea">Equatorial Guinea</option>
<option value="Eritrea">Eritrea</option>
<option value="Estonia">Estonia</option>
<option value="Ethiopia">Ethiopia</option>
<option value="Fiji">Fiji</option>
<option value="Finland">Finland</option>
<option value="France">France</option>
<option value="Gabon">Gabon</option>
<option value="Gambia">Gambia</option>
<option value="Georgia">Georgia</option>
<option value="Germany">Germany</option>
<option value="Ghana">Ghana</option>
<option value="Greece">Greece</option>
<option value="Grenada">Grenada</option>
<option value="Guatemala">Guatemala</option>
<option value="Guinea">Guinea</option>
<option value="Guinea-Bissau">Guinea-Bissau</option>
<option value="Guyana">Guyana</option>
<option value="Haiti">Haiti</option>
<option value="Honduras">Honduras</option>
<option value="Hungary">Hungary</option>
<option value="Iceland">Iceland</option>
<option value="India">India</option>
<option value="Indonesia">Indonesia</option>
<option value="Iran">Iran</option>
<option value="Iraq">Iraq</option>
<option value="Ireland {Republic}">Ireland {Republic}</option>
<option value="Israel">Israel</option>
<option value="Italy">Italy</option>
<option value="Ivory Coast">Ivory Coast</option>
<option value="Jamaica">Jamaica</option>
<option value="Japan">Japan</option>
<option value="Jordan">Jordan</option>
<option value="Kazakhstan">Kazakhstan</option>
<option value="Kenya">Kenya</option>
<option value="Kiribati">Kiribati</option>
<option value="Korea North">Korea North</option>
<option value="Korea South">Korea South</option>
<option value="Kosovo">Kosovo</option>
<option value="Kuwait">Kuwait</option>
<option value="Kyrgyzstan">Kyrgyzstan</option>
<option value="Laos">Laos</option>
<option value="Latvia">Latvia</option>
<option value="Lebanon">Lebanon</option>
<option value="Lesotho">Lesotho</option>
<option value="Liberia">Liberia</option>
<option value="Libya">Libya</option>
<option value="Liechtenstein">Liechtenstein</option>
<option value="Lithuania">Lithuania</option>
<option value="Luxembourg">Luxembourg</option>
<option value="Macedonia">Macedonia</option>
<option value="Madagascar">Madagascar</option>
<option value="Malawi">Malawi</option>
<option value="Malaysia">Malaysia</option>
<option value="Maldives">Maldives</option>
<option value="Mali">Mali</option>
<option value="Malta">Malta</option>
<option value="Marshall Islands">Marshall Islands</option>
<option value="Mauritania">Mauritania</option>
<option value="Mauritius">Mauritius</option>
<option value="Mexico">Mexico</option>
<option value="Micronesia">Micronesia</option>
<option value="Moldova">Moldova</option>
<option value="Monaco">Monaco</option>
<option value="Mongolia">Mongolia</option>
<option value="Montenegro">Montenegro</option>
<option value="Morocco">Morocco</option>
<option value="Mozambique">Mozambique</option>
<option value="Myanmar, {Burma}">Myanmar, {Burma}</option>
<option value="Namibia">Namibia</option>
<option value="Nauru">Nauru</option>
<option value="Nepal">Nepal</option>
<option value="Netherlands">Netherlands</option>
<option value="New Zealand">New Zealand</option>
<option value="Nicaragua">Nicaragua</option>
<option value="Niger">Niger</option>
<option value="Nigeria">Nigeria</option>
<option value="Norway">Norway</option>
<option value="Oman">Oman</option>
<option value="Pakistan">Pakistan</option>
<option value="Palau">Palau</option>
<option value="Panama">Panama</option>
<option value="Papua New Guinea">Papua New Guinea</option>
<option value="Paraguay">Paraguay</option>
<option value="Peru">Peru</option>
<option value="Philippines">Philippines</option>
<option value="Poland">Poland</option>
<option value="Portugal">Portugal</option>
<option value="Qatar">Qatar</option>
<option value="Romania">Romania</option>
<option value="Russian Federation">Russian Federation</option>
<option value="Rwanda">Rwanda</option>
<option value="St Kitts & Nevis">St Kitts & Nevis</option>
<option value="St Lucia">St Lucia</option>
<option value="Saint Vincent & the Grenadines">Saint Vincent & the Grenadines</option>
<option value="Samoa">Samoa</option>
<option value="San Marino">San Marino</option>
<option value="Sao Tome & Principe">Sao Tome & Principe</option>
<option value="Saudi Arabia">Saudi Arabia</option>
<option value="Senegal">Senegal</option>
<option value="Serbia">Serbia</option>
<option value="Seychelles">Seychelles</option>
<option value="Sierra Leone">Sierra Leone</option>
<option value="Singapore">Singapore</option>
<option value="Slovakia">Slovakia</option>
<option value="Slovenia">Slovenia</option>
<option value="Solomon Islands">Solomon Islands</option>
<option value="Somalia">Somalia</option>
<option value="South Africa">South Africa</option>
<option value="Spain">Spain</option>
<option value="Sri Lanka">Sri Lanka</option>
<option value="Sudan">Sudan</option>
<option value="Suriname">Suriname</option>
<option value="Swaziland">Swaziland</option>
<option value="Sweden">Sweden</option>
<option value="Switzerland">Switzerland</option>
<option value="Syria">Syria</option>
<option value="Taiwan">Taiwan</option>
<option value="Tajikistan">Tajikistan</option>
<option value="Tanzania">Tanzania</option>
<option value="Thailand">Thailand</option>
<option value="Togo">Togo</option>
<option value="Tonga">Tonga</option>
<option value="Trinidad & Tobago">Trinidad & Tobago</option>
<option value="Tunisia">Tunisia</option>
<option value="Turkey">Turkey</option>
<option value="Turkmenistan">Turkmenistan</option>
<option value="Tuvalu">Tuvalu</option>
<option value="Uganda">Uganda</option>
<option value="Ukraine">Ukraine</option>
<option value="United Arab Emirates">United Arab Emirates</option>
<option value="United Kingdom">United Kingdom</option>
<option value="United States">United States</option>
<option value="Uruguay">Uruguay</option>
<option value="Uzbekistan">Uzbekistan</option>
<option value="Vanuatu">Vanuatu</option>
<option value="Vatican City">Vatican City</option>
<option value="Venezuela">Venezuela</option>
<option value="Vietnam">Vietnam</option>
<option value="Yemen">Yemen</option>
<option value="Zambia">Zambia</option>
<option value="Zimbabwe">Zimbabwe</option>

  <div class="cfclear"> </div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">City:</label>
    <input class="cf_inputbox required" maxlength="150" size="30" title="" id="text_9" name="city" type="text" />
  <div class="cfclear"> </div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">Postal Code:</label>
    <input class="cf_inputbox required" maxlength="150" size="30" title="" id="text_10" name="postalcode" type="text" />
  <div class="cfclear"> </div>

<div class="form_item">
  <div class="form_element cf_text"> <span class="cf_text">My experience in organization design is:</span> </div>
  <div class="cfclear"> </div>

<div class="form_item">
  <div class="form_element cf_radiobutton">
    <label class="cf_label" style="display: none;">Experience</label>
    <div class="float_left">
      <input value="just beginning" title="" class="radio validate-one-required" id="radio00" name="radio0" type="radio" />
      <label for="radio00" class="radio_label">just beginning</label>
      <br />
<input value="moderate" title="" class="radio validate-one-required" id="radio01" name="radio0" type="radio" />
      <label for="radio01" class="radio_label">moderate</label>
      <br />
<input value="extensive" title="" class="radio validate-one-required" id="radio02" name="radio0" type="radio" />
      <label for="radio02" class="radio_label">extensive</label>
      <br />

  <div class="cfclear"> </div>

<div class="form_item">
  <div class="form_element cf_text"> <span class="cf_text">I am primarily a:</span> </div>
  <div class="cfclear"> </div>

<div class="form_item">
  <div class="form_element cf_radiobutton">
    <label class="cf_label" style="display: none;">Primarily</label>
    <div class="float_left">
      <input value="manager" title="" class="radio validate-one-required" id="radio10" name="radio1" type="radio" />
      <label for="radio10" class="radio_label">manager</label>
      <br />
<input value="consultant" title="" class="radio validate-one-required" id="radio11" name="radio1" type="radio" />
      <label for="radio11" class="radio_label">consultant</label>
      <br />
<input value="academic" title="" class="radio validate-one-required" id="radio12" name="radio1" type="radio" />
      <label for="radio12" class="radio_label">academic</label>
      <br />
<input value="student" title="" class="radio validate-one-required" id="radio13" name="radio1" type="radio" />
      <label for="radio13" class="radio_label">student</label>
      <br />
<input value="other" title="" class="radio validate-one-required" id="radio14" name="radio1" type="radio" />
      <label for="radio14" class="radio_label">other</label>
      <br />

  <div class="cfclear"> </div>

<div class="form_item">
  <div class="form_element cf_text"> <span class="cf_text">If other, please specify:</span> </div>
  <div class="cfclear"> </div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="display: none;">Other</label>
    <input class="cf_inputbox" maxlength="150" size="50" title="" id="text_15" name="other" type="text" />
  <div class="cfclear"> </div>

<div class="form_item">
  <div class="form_element cf_text"> <span class="cf_text">If student, please select:</span> </div>
  <div class="cfclear"> </div>

<div class="form_item">
  <div class="form_element cf_radiobutton">
    <label class="cf_label" style="display: none;">Student Type</label>
    <div class="float_left">
      <input value="undergraduate" title="" class="radio validate-one-required" id="radio20" name="radio2" type="radio" />
      <label for="radio20" class="radio_label">undergraduate</label>
      <br />
<input value="masters" title="" class="radio validate-one-required" id="radio21" name="radio2" type="radio" />
      <label for="radio21" class="radio_label">masters</label>
      <br />
<input value="doctoral" title="" class="radio validate-one-required" id="radio22" name="radio2" type="radio" />
      <label for="radio22" class="radio_label">doctoral</label>
      <br />

  <div class="cfclear"> </div>

<div class="form_item">
  <div class="form_element cf_text"> <span class="cf_text">College or University attending:</span> </div>
  <div class="cfclear"> </div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="display: none;">CollegeUniversity</label>
    <input class="cf_inputbox" maxlength="150" size="30" title="" id="text_20" name="collegeuniversity" type="text" />
  <div class="cfclear"> </div>

<div class="form_item">
  <div class="form_element cf_text"> <span class="cf_text">I accept the GO Society's Terms and Conditions:</span> </div>
  <div class="cfclear"> </div>

<div class="form_item">
  <div class="form_element cf_checkbox">
    <label class="cf_label" style="display: none;">I accept the Terms and Conditions</label>
    <div class="float_left">
      <input value="yes" title="" class="radio validate-one-required" id="check30" name="check3[]" type="checkbox" />
      <label for="check30" class="check_label">yes</label>
      <br />

  <div class="cfclear"> </div>

<div class="form_item">
  <div class="form_element cf_button">
    <input value="Submit" name="button_23" type="submit" /><input type="reset" value="Reset"/>
  <div class="cfclear"> </div>

I also have this in OnSubmit before sending email -
$first_name = JRequest::getVar('first_name', '', 'post');
$last_name = JRequest::getVar('last_name', '', 'post');
$name = $first_name." ".$last_name;
JRequest::setVar('name', $name, 'post');
design2host 05 Jun, 2009
I am facing the exact same problem. Looks like its not middle name cos i dont have a middlename filed itself. It seems like anything which is CB related fields are not saving at all. Username , passwords and confirm passwords are Fine. The remaining has just disappeared and will never stay no matter how you save it.
GreyHead 06 Jun, 2009
Hi all,

Several thing shappening here.

1) There's a bug in the plugin, the CB field names are saved but aren't being redisplayed. Line 87 of cf_cb_registration.php contains this code
value="<?php echo $paramsvalues->get('$fieldname'); ?>
which should be
value="<?php echo $paramsvalues->get($fieldname); ?>
with no quotes around $fieldname. There's a fixed copy of the plugin file attached (unzip and copy the .php file to the ChronoForms plugins folder).

2) If you aren't using fields like 'middlename' then they need to be un-checked in the registration column of the CB user manager. As bek pointed out only fields set for Registration will be picked up by ChronoForms.

3) If you want to collect more field data at registration then add the extrta fields in CB and check them in the Registration column,

4) At the moment ChronoForm only has the Registration form plugin, I think it would be possible to create a plugin that added data to exisiting CB member records if there is enough interest.

chriscaple 08 Jun, 2009
Thanks so much! That totally fixed it. You guys rock.
chriscaple 09 Jun, 2009
Except - okay, that fixed the form part, but... when I fill in the form on the front end and hit submit to register a new test user account... I get a 403 access forbidden message.

Any idea what's up with that?
chriscaple 09 Jun, 2009
Hmm... Joomla's enable registration was off - although CB's was on. I switched Joomla to enable registration and the 403 went away... I got taken to a blank page on the site instead. New user wasn't created. Hm...
chriscaple 09 Jun, 2009
Okay, the problem was the "name" field in the CB plugin. I was trying to do that thing where you join firstname and lastname to create the name, but... that didn't work. I took out that code and just put "lastname" into the "name" spot and now it works - registrations are getting processed. So that's cool.

New issue though - email verification. Can't seem to get it to work. Will see if there's any info on it on the forums here...
GreyHead 10 Jun, 2009
Hi chriscaple,

Not sure if there's any problem with email verification, there have been quite a few posts about some steps in the process.

Joining firstname and lastname should work - set up a hidden field called name and then set the value in the Extra Code before box of the Plugin. This is a code snippet I used recently - it also genereates a password.
$firstname = JRequest::getString('firstname', '', 'post');
$lastname = JRequest::getString('lastname', '', 'post');
JRequest::setVar('name', $firstname.' '.$lastname, 'post');
$password = JUserHelper::genRandomPassword();
JRequest::setVar('password', $password, 'post');


PS I can't remember if the OnSubmit Code boxes are enabled for the released version of the plugin - if they aren't, let me know and I'll post a modified copy here. (Just test with echo "XXX";)
chriscaple 10 Jun, 2009
The name join thing doesn't work. I tried it with and without the password lines.

I put the code in the CB Registration plugin in the OnSubmit tab in the "Extra before onsubmit code" box.

I put this line at the top of the form code itself:

<input type="hidden" name="name" />

No dice...
GreyHead 11 Jun, 2009
Hi chriscaple,

In that case the OnSubmit code isn't enabled. Open cf_cb_registration.php and add the following code at line 202 - thre are 4 new lines.
		$MyForm =& CFChronoForm::getInstance();
		$MyPlugins =& CFPlugins::getInstance($MyForm->formrow->id);

		/** add this code - from here
		if ( !empty($row->extra4) ) {
			eval( "?>".$row->extra4 );
                /** to here
		// If user registration is not allowed, show 403 not authorized.
		$usersConfig = &JComponentHelper::getParams( 'com_users' );

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