Registration form clearing data if error occurs

Permalink
Hi all,

I suspect this might be a simple one but I'm not sure where to start... I have quite a long registration form for new users and if they miss one of the required steps and hit submit, it returns with an error however all of their completed data gets cleared which would be very frustrating due to the length.

Is there any way to retain this data after an error occurs?

 
mobius2000 replied on at Permalink Reply
Is there any kind people out there able to assist or at least point me in the right direction for this issue?

Any help would be greatly appreciated.
mobius2000 replied on at Permalink Reply
In case it helps, here is my register.php page. I can't seem to find anything on the issue even though it is a common practice to retain info following an error submit.

[code]
<?php defined('C5_EXECUTE') or die("Access Denied.");
$f = Loader::helper('form'); ?>


<?php $a = new Area('jQuery Here'); $a->display($c); ?>

<div class="page-header">
<div class="sidebar_widget">
<div class="sidebar_title"><h3><?php echo t('Registration')?> <i><?php echo t('Form')?></i></h3></div>
</div>
</div>

<div style="clear:both"></div>




<?php
$attribs = UserAttributeKey::getRegistrationList();

if($success) { ?>

<div class="span10 offset1">
<?php switch($success) {
case "registered":
?>
<p><strong><?php echo $successMsg ?></strong><br/><br/>
<a href="<?php echo $this->url('/')?>"><?php echo t('Return to Home')?></a></p>
<?php
break;
case "validate":
?>
<p><?php echo $successMsg[0] ?></p>
<p><?php echo $successMsg[1] ?></p>
<p><a href="<?php echo $this->url('/')?>"><?php echo t('Return to Home')?></a></p>
<?php
break;
case "pending":
?>
<p><?php echo $successMsg ?></p>
<p><a href="<?php echo $this->url('/')?>"><?php echo t('Return to Home')?></a></p>
<?php
break;
} ?>

</div>
<?php
} else { ?>

<form method="post" action="<?php echo $this->url('/register', 'do_register')?>" enctype="multipart/form-data" class="form-horizontal field" id="register-form">


<? if (isset($error) && $error != '') { ?>
<?
if ($error instanceof Exception) {
$_error[] = $error->getMessage();
} else if ($error instanceof ValidationErrorHelper) {
$_error = $error->getList();
} else if (is_array($error)) {
$_error = $error;
} else if (is_string($error)) {
$_error[] = $error;
}

?>
<div class="error">
<div class="message-box-wrap"><? foreach($_error as $e) { ?><?=$e?><br /><? } ?></div>
</div>
<? } ?>
<style type="text/css">
.sub-titles {margin:20px 0 0 0;}
.sub-titles h3 {font-size:13px !important;margin:0 0 10px 0 !important;}
span.required {color:#F00;}
.ccm-ui .newAttrValueRow {padding-top: 2px;}
</style>
<p><strong>Note:</strong> All fields marked with <span class="required">*</span> are required fields and the form will not process without information being filled.</p>

<div class="sidebar_widget sub-titles">
<div class="sidebar_title"><h3><?php echo t('Personal')?> <i><?php echo t('Details')?></i></h3></div>
</div>

<div class="clearfix mar_top1"></div>

<input type="hidden" value="<?php echo time(); ?>" name="uName" />

<div class="one_half">
<label for="firstName" class="control-label"><?php echo t('First Name:')?><span class="required"> *</span></label><br />
<input type="text" name="akID[<?php echo UserAttributeKey::getByHandle('firstName')->getAttributeKeyID(); ?>][value]" id="firstName" class="ccm-input-text" />
</div>

<div class="one_half last">
<label for="lastName" class="control-label"><?php echo t('Surname:')?><span class="required"> *</span></label><br />
<input type="text" name="akID[<?php echo UserAttributeKey::getByHandle('lastName')->getAttributeKeyID(); ?>][value]" id="lastName" class="ccm-input-text"/>
</div>

<div class="clearfix mar_top1"></div>

<div class="one_half">
<div class="control-group"><label for="akID[48][value]" class="control-label">Date Of Birth: <i>(xx/xx/xxxx)</i><span class="required"> *</span></label><div class="controls"><span class="ccm-input-date-wrapper" id="akID_48__value__dw"><input type="datetime" id="akID_48__value_" name="akID[48][value]" class="ccm-input-date" value="" /></span><script type="text/javascript">$(function() { $("#akID_48__value_").datepicker({ dateFormat: 'dd/mm/yy', changeYear: true, showAnim: 'fadeIn' }); });</script></div></div>
</div>

<div class="one_half last">
</div>

<div class="clearfix mar_top3"></div>



<div class="sidebar_widget sub-titles">
<div class="sidebar_title"><h3><?php echo t('Contact')?> <i><?php echo t('Details')?></i></h3></div>
</div>

<div class="one_half">
<label for="resAddress1" class="control-label"><?php echo t('Residential Address:')?><span class="required"> *</span></label><br />
<input type="text" name="akID[<?php echo UserAttributeKey::getByHandle('resAddress1')->getAttributeKeyID(); ?>][value]" id="resAddress1" class="ccm-input-text" />
</div>

<div class="one_half last">
<div class="one_half">
<label for="resAddress2" class="control-label"><?php echo t('Suburb/Town:')?><span class="required"> *</span></label><br />
<input type="text" name="akID[<?php echo UserAttributeKey::getByHandle('resAddress2')->getAttributeKeyID(); ?>][value]" id="resAddress2" class="ccm-input-text" />
</div>
<div class="one_half last">
<label for="redpostcode" class="control-label"><?php echo t('Postcode:')?><span class="required"> *</span></label><br />
<input type="text" name="akID[<?php echo UserAttributeKey::getByHandle('redpostcode')->getAttributeKeyID(); ?>][value]" id="redpostcode" class="ccm-input-text" />
</div>
</div>

<div class="clearfix mar_top1"></div>


<div class="one_half last">
<div class="control-group"><label for="akID[42][value]" class="control-label">State:<span class="required"> *</span></label><div class="controls">
<select name="akID[42][atSelectOptionID][]" id="akID[42][atSelectOptionID]1" ccm-passed-value="" class="ccm-input-select"><option value="" selected="selected">** Select</option><option value="41" >VIC</option><option value="42" >NSW</option><option value="43" >QLD</option><option value="44" >NT</option><option value="45" >WA</option><option value="46" >SA</option><option value="47" >TAS</option></select>
</div></div>

</div>

<div class="clearfix mar_top1"></div>

<div class="one_half">
<label for="posAddress1" class="control-label"><?php echo t('Postal Address:')?></label><br />
<input type="text" name="akID[<?php echo UserAttributeKey::getByHandle('posAddress1')->getAttributeKeyID(); ?>][value]" id="posAddress1" class="ccm-input-text" />
</div>

<div class="one_half last">
<div class="one_half">
<label for="posAddress2" class="control-label"><?php echo t('Suburb/Town:')?></label><br />
<input type="text" name="akID[<?php echo UserAttributeKey::getByHandle('posAddress2')->getAttributeKeyID(); ?>][value]" id="posAddress2" class="ccm-input-text" />
</div>
<div class="one_half last">
<label for="postpostcode" class="control-label"><?php echo t('Postcode:')?></label><br />
<input type="text" name="akID[<?php echo UserAttributeKey::getByHandle('postpostcode')->getAttributeKeyID(); ?>][value]" id="postpostcode" class="ccm-input-text" />
</div>
</div>

<div class="clearfix mar_top1"></div>

<div class="one_half last">
<div class="control-group"><label for="akID[45][value]" class="control-label">State:</label><div class="controls">
<select name="akID[45][atSelectOptionID][]" id="akID[45][atSelectOptionID]1" ccm-passed-value="" class="ccm-input-select"><option value="" selected="selected">** Select</option><option value="48" >VIC</option><option value="49" >NSW</option><option value="50" >QLD</option><option value="51" >NT</option><option value="52" >WA</option><option value="53" >SA</option><option value="54" >TAS</option></select>

</div></div>
</div>

<div class="clearfix mar_top1"></div>

<div class="one_half">
<label for="homePhone" class="control-label"><?php echo t('Home Phone Number:')?><span class="required"> *</span></label><br />
<input type="text" name="akID[<?php echo UserAttributeKey::getByHandle('homePhone')->getAttributeKeyID(); ?>][value]" id="homePhone" class="ccm-input-text" />
</div>

<div class="one_half last">
<label for="mobilePhone" class="control-label"><?php echo t('Mobile Phone Number:')?></label><br />
<input type="text" name="akID[<?php echo UserAttributeKey::getByHandle('mobilePhone')->getAttributeKeyID(); ?>][value]" id="mobilePhone" class="ccm-input-text"/>
</div>

<div class="clearfix mar_top1"></div>

<div class="one_half">
<?php echo $form->label('uEmail',t('Email Address <i>(used to log in to profile)</i>:')); ?><span class="required"> *</span><br />
<div class="controls">
<?php echo $form->text('uEmail'); ?>
</div>
</div>

<div class="one_half last">
</div>

<div class="clearfix mar_top3"></div>


<div class="sidebar_widget sub-titles">
<div class="sidebar_title"><h3><?php echo t('Additional')?> <i><?php echo t('Information')?></i></h3></div>
</div>

<div class="clearfix mar_top1"></div>

<div class="one_half">
<div class="control-group"><label for="akID[53][value]" class="control-label">How many staff have you supervised:<span class="required"> *</span></label><div class="controls">
<select name="akID[53][atSelectOptionID][]" id="akID[53][atSelectOptionID]1" ccm-passed-value="" class="ccm-input-select"><option value="" selected="selected">** Select</option><option value="55" >None</option><option value="56" >1-5 Staff</option><option value="57" >6-10 Staff</option><option value="58" >More than 10 Staff</option></select>
</div></div>
</div>

<div class="one_half last">
<div class="control-group"><label for="akID[54][value]" class="control-label">What type of casual employment are you seeking:<span class="required"> *</span></label><div class="controls">
<select name="akID[54][atSelectOptionID][]" id="akID[54][atSelectOptionID]1" ccm-passed-value="" class="ccm-input-select"><option value="" selected="selected">** Select</option><option value="59" >Full-Time</option><option value="60" >Part-Time</option><option value="61" >Temp/Short-Term</option></select>
</div></div>
</div>

<div class="clearfix mar_top1"></div>

<div class="one_half">
<div class="control-group"><label for="akID[55][value]" class="control-label">Do you own your own vechile:<span class="required"> *</span></label><div class="controls">
<select name="akID[55][atSelectOptionID][]" id="akID[55][atSelectOptionID]1" ccm-passed-value="" class="ccm-input-select"><option value="" selected="selected">** Select</option><option value="62" >Yes</option><option value="63" >No</option></select>
</div></div>
</div>

<div class="one_half last">
<div class="control-group"><label for="akID[56][value]" class="control-label">Willing to travel:<span class="required"> *</span></label><div class="controls">
<select name="akID[56][atSelectOptionID][]" id="akID[56][atSelectOptionID]1" ccm-passed-value="" class="ccm-input-select"><option value="" selected="selected">** Select</option><option value="64" >Locally</option><option value="65" >Country</option><option value="66" >Interstate</option></select>
</div></div>
</div>

<div style="clear:both"></div>

<div class="clearfix mar_top2"></div>
Do you have a First Aid Certificate:<br /><br />

<div class="two_third last">

<div class="one_third">
<div class="control-group"><label for="akID[57][value]" class="control-label">First Aid - Level 1</label><div class="controls"><label class="checkbox"><label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[57][value]" id="akID[57][value]" value="1" /> <span>Yes</span></label></label></div></div>
</div>

<div class="one_third last">
<div class="control-group"><label for="akID[58][value]" class="control-label">Expiry Date</label><div class="controls"><span class="ccm-input-date-wrapper" id="akID_58__value__dw"><input type="datetime" id="akID_58__value_" name="akID[58][value]" class="ccm-input-date" value="" /></span><script type="text/javascript">$(function() { $("#akID_58__value_").datepicker({ dateFormat: 'dd.mm.yy', changeYear: true, showAnim: 'fadeIn' }); });</script></div></div>
</div>

<div class="clearfix mar_top1"></div>

<div class="one_third">
<div class="control-group"><label for="akID[59][value]" class="control-label">First Aid - Level 2</label><div class="controls"><label class="checkbox"><label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[59][value]" id="akID[59][value]" value="1" /> <span>Yes</span></label></label></div></div>
</div>

<div class="one_third last">
<div class="control-group"><label for="akID[60][value]" class="control-label">Expiry Date</label><div class="controls"><span class="ccm-input-date-wrapper" id="akID_60__value__dw"><input type="datetime" id="akID_60__value_" name="akID[60][value]" class="ccm-input-date" value="" /></span><script type="text/javascript">$(function() { $("#akID_60__value_").datepicker({ dateFormat: 'dd.mm.yy', changeYear: true, showAnim: 'fadeIn' }); });</script></div></div>
</div>
<div class="clearfix mar_top1"></div>

<div class="one_third">
<div class="control-group"><label for="akID[61][value]" class="control-label">First Aid - Level 3</label><div class="controls"><label class="checkbox"><label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[61][value]" id="akID[61][value]" value="1" /> <span>Yes</span></label></label></div></div>
</div>

<div class="one_third last">
<div class="control-group"><label for="akID[62][value]" class="control-label">Expiry Date</label><div class="controls"><span class="ccm-input-date-wrapper" id="akID_62__value__dw"><input type="datetime" id="akID_62__value_" name="akID[62][value]" class="ccm-input-date" value="" /></span><script type="text/javascript">$(function() { $("#akID_62__value_").datepicker({ dateFormat: 'dd.mm.yy', changeYear: true, showAnim: 'fadeIn' }); });</script></div></div>
</div>
<div class="clearfix mar_top1"></div>
</div>
<div class="one_third">

</div>


<div style="clear:both"></div>
<div class="clearfix mar_top3"></div>

<div class="sidebar_widget sub-titles">
<div class="sidebar_title"><h3><?php echo t('Employment')?> <i><?php echo t('References')?></i></h3></div>
</div>

<div style="clear:both"></div>

<div class="one_fourth">
<label for="ref1name" class="control-label"><?php echo t('1. Name:')?><span class="required"> *</span></label><br />
<input type="text" name="akID[<?php echo UserAttributeKey::getByHandle('ref1name')->getAttributeKeyID(); ?>][value]" id="ref1name" class="ccm-input-text" />
</div>
<div class="one_fourth">
<label for="ref1pos" class="control-label"><?php echo t('Position:')?><span class="required"> *</span></label><br />
<input type="text" name="akID[<?php echo UserAttributeKey::getByHandle('ref1pos')->getAttributeKeyID(); ?>][value]" id="ref1pos" class="ccm-input-text" />
</div>
<div class="one_fourth">
<label for="ref1comp" class="control-label"><?php echo t('Company:')?><span class="required"> *</span></label><br />
<input type="text" name="akID[<?php echo UserAttributeKey::getByHandle('ref1comp')->getAttributeKeyID(); ?>][value]" id="ref1comp" class="ccm-input-text" />
</div>
<div class="one_fourth last">
<label for="ref1phone" class="control-label"><?php echo t('Phone:')?><span class="required"> *</span></label><br />
<input type="text" name="akID[<?php echo UserAttributeKey::getByHandle('ref1phone')->getAttributeKeyID(); ?>][value]" id="ref1phone" class="ccm-input-text" />
</div>

<div class="clearfix mar_top1"></div>

<div class="one_fourth">
<label for="ref2name" class="control-label"><?php echo t('2. Name:')?><span class="required"> *</span></label><br />
<input type="text" name="akID[<?php echo UserAttributeKey::getByHandle('ref2name')->getAttributeKeyID(); ?>][value]" id="ref2name" class="ccm-input-text" />
</div>
<div class="one_fourth">
<label for="ref2pos" class="control-label"><?php echo t('Position:')?><span class="required"> *</span></label><br />
<input type="text" name="akID[<?php echo UserAttributeKey::getByHandle('ref2pos')->getAttributeKeyID(); ?>][value]" id="ref2pos" class="ccm-input-text" />
</div>
<div class="one_fourth">
<label for="ref2comp" class="control-label"><?php echo t('Company:')?><span class="required"> *</span></label><br />
<input type="text" name="akID[<?php echo UserAttributeKey::getByHandle('ref2comp')->getAttributeKeyID(); ?>][value]" id="ref2comp" class="ccm-input-text" />
</div>
<div class="one_fourth last">
<label for="ref2phone" class="control-label"><?php echo t('Phone:')?><span class="required"> *</span></label><br />
<input type="text" name="akID[<?php echo UserAttributeKey::getByHandle('ref2phone')->getAttributeKeyID(); ?>][value]" id="ref2phone" class="ccm-input-text" />
</div>

<div class="clearfix mar_top1"></div>

<div class="one_fourth">
<label for="ref3name" class="control-label"><?php echo t('3. Name:')?><span class="required"> *</span></label><br />
<input type="text" name="akID[<?php echo UserAttributeKey::getByHandle('ref3name')->getAttributeKeyID(); ?>][value]" id="ref3name" class="ccm-input-text" />
</div>
<div class="one_fourth">
<label for="ref3pos" class="control-label"><?php echo t('Position:')?><span class="required"> *</span></label><br />
<input type="text" name="akID[<?php echo UserAttributeKey::getByHandle('ref3pos')->getAttributeKeyID(); ?>][value]" id="ref3pos" class="ccm-input-text" />
</div>
<div class="one_fourth">
<label for="ref3comp" class="control-label"><?php echo t('Company:')?><span class="required"> *</span></label><br />
<input type="text" name="akID[<?php echo UserAttributeKey::getByHandle('ref3comp')->getAttributeKeyID(); ?>][value]" id="ref3comp" class="ccm-input-text" />
</div>
<div class="one_fourth last">
<label for="ref3phone" class="control-label"><?php echo t('Phone:')?><span class="required"> *</span></label><br />
<input type="text" name="akID[<?php echo UserAttributeKey::getByHandle('ref3phone')->getAttributeKeyID(); ?>][value]" id="ref3phone" class="ccm-input-text" />
</div>




<div style="clear:both"></div>
<div class="clearfix mar_top3"></div>

<div class="sidebar_widget sub-titles">
<div class="sidebar_title"><h3>Your <i>Qualifications</i></h3></div>
</div>

<div style="clear:both"></div>


<div class="control-group"><label for="akID[75][value]" class="control-label"><strong>Please note:</strong> Where applicable; copies of Licenses, Certs, Cards and Tickets must be provided</label></div>
<div class="clearfix mar_top1"></div>


<div class="one_third">
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_67" value="67" />Abseiler (Twin Rope)</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_68" value="68" />Architect</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_69" value="69" />Asbestos Removal</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_70" value="70" />Backhoe</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_71" value="71" />Bobcat</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_72" value="72" />Boilermaker</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_73" value="73" />Bricklayer</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_74" value="74" />Bulldozer</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_75" value="75" />Cabinetmaker</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_76" value="76" />Carpenter</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_77" value="77" />Concrete Placing Boom</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_78" value="78" />Confimed Space Entry</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_79" value="79" />Construction Manager</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_80" value="80" />Contract Administrator</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_81" value="81" />Crane Bridge-Gantry</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_82" value="82" />Crane Derrick</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_83" value="83" />Crane Non Slewing</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_84" value="84" />Crane Portal Boom</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_85" value="85" />Crane Slew Mob 20 ton</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_86" value="86" />Crane Slew Mob 60 ton +</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_87" value="87" />Crane Slew Mob 100 ton</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_88" value="88" />Crane Slew Mob 100 ton +</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_89" value="89" />Crane Tower</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_90" value="90" />Crane Vechile Loading</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_91" value="91" />Dogging</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_92" value="92" />Draftsperson</label><br />
</div>
<div class="one_third">
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_93" value="93" />Elevated Work Platform</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_94" value="94" />Engineer</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_95" value="95" />Excavator</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_96" value="96" />Explosive Power Tools</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_97" value="97" />Fitter & Turner</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_98" value="98" />Forklift Trucks</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_99" value="99" />Front End Loader</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_100" value="100" />Glazier</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_101" value="101" />Grader</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_102" value="102" />Graduate Builder</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_103" value="103" />Hoist Materials</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_104" value="104" />Hoist Personnel</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_105" value="105" />Joiner</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_106" value="106" />Landscaper</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_107" value="107" />Laser Level License</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_108" value="108" />License Bike</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_109" value="109" />License Car</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_110" value="110" />License Heavy Combination</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_111" value="111" />License Heavy Rigid</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_112" value="112" />License Medium Rigid</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_113" value="113" />Lift Mechanic</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_114" value="114" />Locksmith</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_115" value="115" />Miners License</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_116" value="116" />OH&S Safety Representative</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_117" value="117" />Painter & Decorator</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_118" value="118" />Plasterer (Board)</label><br />
</div>
<div class="one_third last">
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_119" value="119" />Plasterer (Solid)</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_120" value="120" />Plumber</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_121" value="121" />Refrigeration Mechanic</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_122" value="122" />Rigging Basic</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_123" value="123" />Rigging Intermediate</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_124" value="124" />Rigging Advanced</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_125" value="125" />Roller</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_126" value="126" />S Permit</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_127" value="127" />Scaffolding Basic</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_128" value="128" />Scaffolding Intermediate</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_129" value="129" />Scaffolding Advanced</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_130" value="130" />Scaffolding Ltd Height</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_131" value="131" />Scraper</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_132" value="132" />Sheet metal (Class 1)</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_133" value="133" />Signwriter</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_134" value="134" />Skills Assessor</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_135" value="135" />Spotters</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_136" value="136" />Sprinkler Fitter</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_137" value="137" />Stonemason</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_138" value="138" />Tiler – Floor and Wall</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_139" value="139" />Tiler – Roofing</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_140" value="140" />Traffic Controller</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_141" value="141" />Trench Shoring</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_142" value="142" />Water Sprayer</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_143" value="143" />Welder (Ticketed)</label><br />
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[75][atSelectOptionID][]" id="akID[75][atSelectOptionID]_144" value="144" />Winch Operator</label><br />
</div>
<div class="clearfix mar_top1"></div>




<div class="clearfix mar_top2"></div>

<div class="two_third">
Please tick the Civil Contractors Federation Card's that you possess:<br />
<div class="clearfix mar_top1"></div>
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[83][atSelectOptionID][]" id="akID[83][atSelectOptionID]_149" value="149">Red </label>  
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[83][atSelectOptionID][]" id="akID[83][atSelectOptionID]_150" value="150">White </label>  
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[83][atSelectOptionID][]" id="akID[83][atSelectOptionID]_151" value="151">Blue </label>  
<label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[83][atSelectOptionID][]" id="akID[83][atSelectOptionID]_152" value="152">Green </label>
</div>








<div style="clear:both"></div>
<div class="clearfix mar_top3"></div>

<div class="sidebar_widget sub-titles">
<div class="sidebar_title"><h3><?php echo t('File')?> <i><?php echo t('Uploads')?></i></h3></div>
</div>

<div style="clear:both"></div>



Attachment 1 (Resume)<br />
<div class="controls"><input type="file" id="akID[77][value]" name="akID[77][value]" value="" class="ccm-input-file" /></div>
<div class="clearfix mar_top1"></div>
Attachment 2 (Certifications)<br />
<div class="controls"><input type="file" id="akID[78][value]" name="akID[78][value]" value="" class="ccm-input-file" /></div>
<div class="clearfix mar_top1"></div>
Attachment 3 (Licenses)<br />
<div class="controls"><input type="file" id="akID[79][value]" name="akID[79][value]" value="" class="ccm-input-file" /></div>
<div class="clearfix mar_top1"></div>
Atachment 4 (Medical – if required)<br />
<div class="controls"><input type="file" id="akID[80][value]" name="akID[80][value]" value="" class="ccm-input-file" /></div>

<div style="clear:both"></div>
<div class="clearfix mar_top3"></div>

<div class="sidebar_widget sub-titles">
<div class="sidebar_title"><h3><?php echo t('Specific')?> <i><?php echo t('Position')?></i></h3></div>
</div>

<div style="clear:both"></div>

<p>If you are applying for a specific position found on this website, please note the position title below</p>

<input type="text" name="akID[<?php echo UserAttributeKey::getByHandle('positionInterest')->getAttributeKeyID(); ?>][value]" id="positionInterest" class="ccm-input-text" />

<div class="clearfix mar_top3"></div>


<div class="sidebar_widget sub-titles">
<div class="sidebar_title"><h3><?php echo t('Login')?> <i><?php echo t('Details')?></i></h3></div>
</div>

<div style="clear:both"></div>

<p><strong>Please Note:</strong> The email address you entered above will become your username</p>

<div class="control-group">
<?php echo $form->label('uPassword',t('Create New Password: ')); ?><span class="required">*</span>
<div class="controls">
<?php echo $form->password('uPassword'); ?>
</div>
</div>
<div class="clearfix mar_top1"></div>
<div class="control-group">
<?php echo $form->label('uPasswordConfirm',t('Confirm Password: ')); ?><span class="required">*</span>
<div class="controls">
<?php echo $form->password('uPasswordConfirm'); ?>
</div>
</div>

<div class="clearfix mar_top1"></div>

<p><strong>Terms and Conditions</strong><br />Submission of this form does not constitute an emnployment offer. By submitting this form you are declaring that to the best of your knowledge all of the details contained within are true and correct. Under the privacy act, we need to tell you that we collect information about you to assist us in obtaining and/or managing your employment with The Workz Group Pty Ltd. We do not disclose information about you to any person except as required in the course of providing recruitment and /or employment services to you or in the provision of ordinary administration for our business. You can request access to the information that we hold about you at any time by contacting us at info@workz.com.au.<p>

<div class="clearfix mar_top1"></div>
<div class="control-group"><label for="akID[49][value]" class="control-label"><strong>Accept Terms and Conditions?</strong></label><div class="controls"><label class="checkbox"><label class="checkbox"><input type="checkbox" class="ccm-input-checkbox" name="akID[49][value]" id="akID[49][value]" value="1" /> <span>Yes</span></label></label></div></div>


<div class="clearfix mar_top3"></div>






<div class="span10 offset1 ">
<?php if (ENABLE_REGISTRATION_CAPTCHA) { ?>

<div class="control-group">
<?php $captcha = Loader::helper('validation/captcha'); ?>

<div class="controls">
<?php
$captcha->display();
?>
</div>

<?php
$captcha->showInput();
?>
<?php echo $captcha->label()?>
</div>


<?php } ?>
</div>

<div class="clearfix mar_top3"></div>







<div class="span10 offset1">
<div class="actions">
<?php echo $form->hidden('rcID', $rcID); ?>
<?php echo $form->submit('register', t('Register') . ' >', array('class' => 'primary'))?>
</div>
</div>
<div class="clearfix mar_top3"></div>

<p>If you have any problems in completing this form, please contact The Workz Group directly via the <a href="/contact-us/" title="Contact Us">Contact Us</a> page.</p>



</form>
<?php } ?>

[/code].
ronyDdeveloper replied on at Permalink Best Answer Reply
ronyDdeveloper
As I can see, you have hard coded all the user attributes in the registration page and it doesn't called through the $form helper. So in all the cases it doesn't have the value. I'm sure it holds the value for password and confirm password field as it called through the $form helper.

Rony
mobius2000 replied on at Permalink Reply
All points are correct... Besides the password/username, all fields are hardcoded. And only the password/username retain their inputs following an error.

Is there any way of getting this to retain the values even though it's not going through the form helper correctly?

Please excuse my silly questions... I am very weak at PHP :-)
ronyDdeveloper replied on at Permalink Reply
ronyDdeveloper
I'm not fully sure but you can have it a try:
<input type="text" name="akID[<?php echo UserAttributeKey::getByHandle('positionInterest')->getAttributeKeyID(); ?>][value]" id="positionInterest" class="ccm-input-text" />


for this you need to set a value

<input type="text" name="akID[<?php echo UserAttributeKey::getByHandle('positionInterest')->getAttributeKeyID(); ?>][value]" id="positionInterest" value="<?php $this->post('akID["UserAttributeKey::getByHandle(\"positionInterest\")->getAttributeKeyID()"][value]')?>" class="ccm-input-text" />


Maybe it can show you some error due to quotes placement

Rony
mobius2000 replied on at Permalink Reply
No luck with that I;m afraid Rony, thanks for the suggestion but unfortunately it it seemed to have no effect on the issue.

Any chance you had any other ideas? Thank you again for taking the time.
mobius2000 replied on at Permalink Reply
I have done some playing around with
value="<?php $this->post('akID["UserAttributeKey::getByHandle(\"positionInterest\")->getAttributeKeyID()"][value]')?>"

And it seems to be throwing errors. It seems to be close but not quite fixing the issue. I have tried playing with the quotation marks but then seem to give myself bigger errors where the page won't load.

Can anybody confirm if this code has basic errors or if it is simply not going to do what I need it to do?

Please, any help would be greatly appreciated.
mobius2000 replied on at Permalink Reply
Ok, I tried a little something which told me a little more...

Out of desperation I tried placing:
<?php
$answer = (isset($_POST['answer'])) ? $_POST['answer'] : '';
?>

at the top of register.php and in the input fields I added the value of:
value="<?php print $answer;?>"


Sadly this didn't work but upon inspecting the source I found that the value tag was being left simply as 'value' so my source for the input is:
<input type="text" name="akID[36][value]" value="" id="firstName" class="ccm-input-text text">


So something different seems to be happening here... Any help anyone? My client is getting a little ancy and I'd be happy to pay someone (PayPal) for some help on this quickly.

Pretty please!!!! :-)
mobius2000 replied on at Permalink Reply
Ok, I sorted it out by going back to the 'for each' method that is standard with concrete5 and added individual classes to each element using jquery and then restyled the form as required.

If anyone comes across an issue like this, let me know and I'll send my script. It's messy but works.