Hi Bob,
Basically i have 2 forms with one form continue button
I have configured my form with new table and when configured using dbconnection before email.
I am getting this error:
Here is my form code
Auto generated code:
Basically i have 2 forms with one form continue button
I have configured my form with new table and when configured using dbconnection before email.
I am getting this error:
Fatal error: Call to a member function bind() on a non-object in D:\xampp\htdocs\test\components\com_chronocontact\libraries\customcode.php(74) : eval()'d code on line 13
Here is my form code
<div class="form_item">
<div class="form_element cf_radiobutton">
<label class="cf_label" style="width: 150px;">What would you like to sign up as? </label>
<div class="float_left">
<input value="SINGER" title="" class="radio" id="radio00" name="radio0" type="radio" />
<label for="radio00" class="radio_label">SINGER</label>
<br />
<input value="RAPPER" title="" class="radio" id="radio01" name="radio0" type="radio" />
<label for="radio01" class="radio_label">RAPPER</label>
<br />
<input value="SINGER/SONGWRITER" title="" class="radio" id="radio02" name="radio0" type="radio" />
<label for="radio02" class="radio_label">SINGER/SONGWRITER</label>
<br />
<input value="SONGWRITER" title="" class="radio" id="radio03" name="radio0" type="radio" />
<label for="radio03" class="radio_label">SONGWRITER</label>
<br />
<input value="PRODUCER" title="" class="radio" id="radio04" name="radio0" type="radio" />
<label for="radio04" class="radio_label">PRODUCER</label>
<br />
</div>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_radiobutton">
<label class="cf_label" style="width: 150px;">Gender:</label>
<div class="float_left">
<input value="Male" title="" class="radio" id="radio10" name="radio1" type="radio" />
<label for="radio10" class="radio_label">Male</label>
<br />
<input value="Female" title="" class="radio" id="radio11" name="radio1" type="radio" />
<label for="radio11" class="radio_label">Female</label>
<br />
</div>
<a class="tooltiplink" onclick="return false;"><img height="16" border="0" width="16" class="tooltipimg" alt="" src="components/com_chronocontact/css/images/tooltip.png"/></a>
<div class="tooltipdiv">Gender: :: *</div>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_heading">
<h3 class="cf_text">Artist or Band Information. Infomation about an artist or band is displayed on your public profile </h3>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_radiobutton">
<label class="cf_label" style="width: 150px;">Artist Type:</label>
<div class="float_left">
<input value="SoloArtist" title="" class="radio" id="radio20" name="radio2" type="radio" />
<label for="radio20" class="radio_label">Solo Artist</label>
<br />
<input value="Band/Group" title="" class="radio" id="radio21" name="radio2" type="radio" />
<label for="radio21" class="radio_label">Band/Group</label>
<br />
</div>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 150px;">Artist or Band Name:</label>
<input class="cf_inputbox" maxlength="150" size="30" title="" id="text_4" name="text_4" type="text" />
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_dropdown">
<label class="cf_label" style="width: 150px;">Main Genre:</label>
<select class="cf_inputbox" id="select_5" size="1" title="" name="select_5">
<option value="">Choose Option</option>
<option value="Choose">Choose</option>
<option value="Alternative">Alternative</option>
<option value="Blues">Blues</option>
<option value="Christian/Gospel">Christian/Gospel</option>
<option value="Classical">Classical</option>
<option value="Country">Country</option>
<option value="DJ">DJ</option>
<option value="Electronica/Dance">Electronica/Dance</option>
<option value="Folk">Folk</option>
<option value="Hip Hop">Hip Hop</option>
<option value="Jazz">Jazz</option>
<option value="Latin">Latin</option>
<option value="Metal">Metal</option>
<option value="Other">Other</option>
<option value="Pop">Pop</option>
<option value="R&B/Soul">R&B/Soul</option>
<option value="Rock">Rock</option>
<option value="World/Reggae">World/Reggae</option>
</select>
<a class="tooltiplink" onclick="return false;"><img height="16" border="0" width="16" class="tooltipimg" alt="" src="components/com_chronocontact/css/images/tooltip.png"/></a>
<div class="tooltipdiv">Main Genre: :: (# 1 Choice of Music)</div>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_dropdown">
<label class="cf_label" style="width: 150px;">Genre #2:</label>
<select class="cf_inputbox" id="select_6" size="1" title="" name="select_6">
<option value="">Choose Option</option>
<option value="Choose">Choose</option>
<option value="Alternative">Alternative</option>
<option value="Blues">Blues</option>
<option value="Christian/Gospel">Christian/Gospel</option>
<option value="Classical">Classical</option>
<option value="Country">Country</option>
<option value="DJ">DJ</option>
<option value="Electronica/Dance">Electronica/Dance</option>
<option value="Folk">Folk</option>
<option value="Hip Hop">Hip Hop</option>
<option value="Jazz">Jazz</option>
<option value="Latin">Latin</option>
<option value="Metal">Metal</option>
<option value="Other">Other</option>
<option value="Pop">Pop</option>
<option value="R&B/Soul">R&B/Soul</option>
<option value="Rock">Rock</option>
<option value="World/Reggae">World/Reggae</option>
</select>
<a class="tooltiplink" onclick="return false;"><img height="16" border="0" width="16" class="tooltipimg" alt="" src="components/com_chronocontact/css/images/tooltip.png"/></a>
<div class="tooltipdiv">Genre #2: :: Optional (# 2 Choice of Music)</div>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_dropdown">
<label class="cf_label" style="width: 150px;">Genre #3:</label>
<select class="cf_inputbox" id="select_7" size="1" title="" name="select_7">
<option value="">Choose Option</option>
<option value="Choose">Choose</option>
<option value="Alternative">Alternative</option>
<option value="Blues">Blues</option>
<option value="Christian/Gospel">Christian/Gospel</option>
<option value="Classical">Classical</option>
<option value="Country">Country</option>
<option value="DJ">DJ</option>
<option value="Electronica/Dance">Electronica/Dance</option>
<option value="Folk">Folk</option>
<option value="Hip Hop">Hip Hop</option>
<option value="Jazz">Jazz</option>
<option value="Latin">Latin</option>
<option value="Metal">Metal</option>
<option value="Other">Other</option>
<option value="Pop">Pop</option>
<option value="R&B/Soul">R&B/Soul</option>
<option value="Rock">Rock</option>
<option value="World/Reggae">World/Reggae</option>
</select>
<a class="tooltiplink" onclick="return false;"><img height="16" border="0" width="16" class="tooltipimg" alt="" src="components/com_chronocontact/css/images/tooltip.png"/></a>
<div class="tooltipdiv">Genre #3: :: (# 3 Choice of Music)</div>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 150px;">Website :</label>
<input class="cf_inputbox" maxlength="150" size="30" title="" id="text_8" name="text_8" type="text" />
<a class="tooltiplink" onclick="return false;"><img height="16" border="0" width="16" class="tooltipimg" alt="" src="components/com_chronocontact/css/images/tooltip.png"/></a>
<div class="tooltipdiv">Website : :: Optional</div>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 150px;">City</label>
<input class="cf_inputbox" maxlength="150" size="30" title="" id="text_9" name="text_9" type="text" />
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_dropdown">
<label class="cf_label" style="width: 150px;">State</label>
<select class="cf_inputbox" id="select_10" size="1" title="" name="select_10">
<option value="">Choose Option</option>
<option value="Alabama">Alabama</option>
<option value="Alaska">Alaska</option>
<option value="Arizona">Arizona</option>
<option value="Arkansas">Arkansas</option>
<option value="California">California</option>
<option value="Colorado">Colorado</option>
<option value="Connecticut">Connecticut</option>
<option value="Delaware">Delaware</option>
<option value="District of Columbia">District of Columbia</option>
<option value="Florida">Florida</option>
<option value="Georgia">Georgia</option>
<option value="Hawaii">Hawaii</option>
<option value="Idaho">Idaho</option>
</select>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textarea">
<label class="cf_label" style="width: 150px;">Influenced By:</label>
<textarea class="cf_inputbox" rows="3" id="text_11" title="" cols="30" name="text_11"></textarea>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_heading">
<h3 class="cf_text">Your E-mail Address. Email address will not be displayed on your public profile </h3>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 150px;">E-mail:</label>
<input class="cf_inputbox validate-email" maxlength="150" size="30" title="" id="text_14" name="text_14" type="text" />
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 150px;">Confirm E-mail:</label>
<input class="cf_inputbox validate-email" maxlength="150" size="30" title="" id="text_15" name="text_15" type="text" />
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_button">
<input value="CONTINUE" name="button_16" type="submit" />
</div>
<div class="cfclear"> </div>
</div>
Auto generated code:
<?php
$MyForm =& CFChronoForm::getInstance("form_new");
if($MyForm->formparams("dbconnection") == "Yes"){
$user = JFactory::getUser();
$row =& JTable::getInstance("chronoforms_form_new", "Table");
srand((double)microtime()*10000);
$inum = "I" . substr(base64_encode(md5(rand())), 0, 16).md5(uniqid(mt_rand(), true));
JRequest::setVar( "recordtime", JRequest::getVar( "recordtime", date("Y-m-d")." - ".date("H:i:s"), "post", "string", "" ));
JRequest::setVar( "ipaddress", JRequest::getVar( "ipaddress", $_SERVER["REMOTE_ADDR"], "post", "string", "" ));
JRequest::setVar( "uid", JRequest::getVar( "uid", $inum, "post", "string", "" ));
JRequest::setVar( "cf_user_id", JRequest::getVar( "cf_user_id", $user->id, "post", "int", "" ));
$post = JRequest::get( "post" , JREQUEST_ALLOWRAW );
if (!$row->bind( $post )) {
JError::raiseWarning(100, $row->getError());
}
if (!$row->store()) {
JError::raiseWarning(100, $row->getError());
}
$MyForm->tablerow["jos_chronoforms_form_new"] = $row;
}
?>