Hi team can i get code for multistage form as i have try work on them but still i have not succeed
Hi,
Welcome to the Wix Code forums.
Take a look at the Multistage Form example which is just what you’re trying to do. You can load the example in the editor, play with it, and then modify it for your own use.
Have fun,
Yisrael
Thanks Yisrael appreciate this
Hi,
I try get the code at the Multistage Form example, but I can’t reproduce it in my website. The only diference in my page, is that i linked de users inputs to a database.
There’s my code:
function showPessoais() {
$w(‘#slideshow’).changeSlide(0);
$w(‘#pessoais’).disable();
$w(‘#servico’).enable();
$w(‘#documento’).disable();
$w(‘#linhapessoais’).show();
$w(‘#linhaservico’).hide();
$w(‘#linhadocumento’).hide();
}
function showServico() {
$w(‘#slideshow’).changeSlide(1);
$w(‘#pessoais’).enable();
$w(‘#servico’).disable();
$w(‘#documento’).enable();
$w(‘#linhapessoais’).hide();
$w(‘#linhaservico’).show();
$w(‘#linhadocumento’).hide();
}
function showDocumentos() {
$w(‘#slideshow’).changeSlide(2);
$w(‘#pessoais’).disable();
$w(‘#servico’).enable();
$w(‘#documento’).disable();
$w(‘#linhapessoais’).hide();
$w(‘#linhaservico’).hide();
$w(‘#linhadocumento’).show();
}
export function buttoncontinuar_onClick(event) {
showServico();
}
export function buttonanexardocumentos_onClick(event) {
showDocumentos();
}
export function buttonenviar_onClick(event) {
showPessoais();
}
export function servico_onClick(event) {
showServico();
}
export function documento_onClick(event) {
showDocumentos();
}
export function pessoais_onClick(event) {
showPessoais();
}
When I test it, the slideshow doesn’t change to the next slide.
Please help me bacause I donn’t know what to do.
Hi Yisrael,
I was successful coding this except for one element - the required fields. If there are required fields in slide 1 of 3, they won’t be activated until the “write” button that is on slide 3 of 3 and at that point the user will feel lost about where they need to go.
Is there a way to activate the error on each slide before allowing user to continue?