Div Based Multi-page Forms Validation.

Please post your suggestions or any hacks you have made here

Div Based Multi-page Forms Validation.

Postby kwelker on Thu May 08, 2008 2:18 pm

All,

I read the Suggestions & Hacks: multi-page form thread using a div based solution with interest and then successfully implemented it. The trick is validation should happen as you click "next" on each page for that particular div right? Current for me it's just happening on the last div when I click submit.

Has anyone already figured out how to make that happen for each page/div and can provide the solution before I start trying to figure it out?

Thanks,
Kevin
kwelker
Fresh Boarder
 
Posts: 3
Joined: Thu May 08, 2008 2:08 pm

Re:Div Based Multi-page Forms Validation.

Postby kwelker on Thu May 08, 2008 2:23 pm

I should point out the original thread on div based multi-page forms is here:
kwelker
Fresh Boarder
 
Posts: 3
Joined: Thu May 08, 2008 2:08 pm

Re:Div Based Multi-page Forms Validation.

Postby kwelker on Thu May 08, 2008 8:56 pm

The solution was to call to validate from the next button onclick. The validate code is nicely written to just validate unhidden elements so it works great!

Code: Select all
<input type=button onclick=" if(!valid.validate()) Event.stop(ev) ; collapseElem('mainForm_1') ; expandElem('mainForm_2') ;" 
class="mainForm" value="Next Page" />


Thanks,
Kevin


http://www.linkedin.com/in/kevinwelker
kwelker
Fresh Boarder
 
Posts: 3
Joined: Thu May 08, 2008 2:08 pm

Re: Div Based Multi-page Forms Validation.

Postby admin on Fri Aug 22, 2008 2:24 am

the last code works but generates a JS error, for anybody else, this one doesn't make error :
Code: Select all
function val1(e){
if(!valid.validate()) {
    return false;
}else{
    step_next(1);
}
}


and

<input type="button" value="Next Step" onClick="return val1(event);">
ChronoForms/ChronoConnectivity/ChronoComments Developer Thanks for using our components!
If you have any problems with any extension please tell us.
If you like any of our extensions please post a review at Joomla.org
Want users to submit their content to your website ? try Submit Story
Want to list/edit/delete your data ? try ChronoConnectivity
Want to have stylish AJAX comments ? try ChronoComments
User avatar
admin
Platinum Boarder
 
Posts: 3235
Joined: Mon Aug 14, 2006 5:29 am


Return to ChronoForms Suggestions & Hacks

Who is online

Users browsing this forum: MSN [Bot] and 5 guests

cron