Forums

multi page form with conditional field that determine the ne

ludo007 26 Feb, 2010
hi
i want to make a multi form page but the choice of a value in the first page, determine the next page that will appear. Is it possible and how?
thanks
GreyHead 26 Feb, 2010
Hi ludo007,

It's possible several ways. Are the subsequent pages completely different is it just that some inputs are displayed and others hidden?

Bob
GreyHead 27 Feb, 2010
Hi ludo007,

I think that I would do this by using the multi-page plugin but creating a form for the second step that included it's form html from a separate file. This is quite easy, the basic code is this.
<?php
if ( !$mainframe->isSite() ) { return; }
include (JPATH_SITE.DS.'components'.DS.'com_chronocontact'.DS.'includes'.DS.'my_form_name'.DS.'formhtml_a.php');
?>

But you could then change the imported file depending on the value of an input from the previous step.
<?php
if ( !$mainframe->isSite() ) { return; }
$input = // some value;
switch ( $input) {
  case 'xxx' :
    $form = 'formhmtl_a.php';
    break;  
  case 'yyy' :
    $form = 'formhmtl_b.php';
    break;  
  case 'zzz' :
  default:
    $form = 'formhmtl_c.php';
    break;

}
include (JPATH_SITE.DS.'components'.DS.'com_chronocontact'.DS.'includes'.DS.'my_form_name'.DS.$form);
?>

Bob
ludo007 02 Mar, 2010
ok thanks a lot,
but is it possible to make a dynamic submit url for a form? This url can be change through javascript
when a user select a value of drop down input
GreyHead 02 Mar, 2010
Hi ludo007,

Probably - I've never tried. What would that let you do?

Bob
ludo007 09 Mar, 2010
i try this solution but i have some problems:
1- Where do i put the file formhtml_xx.php
2- i need that one of my form page is a joomla registration page. How can i do that? how can i make a confirmation email like the native joomla form.
3- i need to store data for some page of my form into different table

Thanks
GreyHead 09 Mar, 2010
Hi ludo007,

1) Whereever is convenient. I create a components/com_chronocontact/includes/form_name folder

2) You can use the Joomla Registration plugin

3) I think that the multi-page plugin thread explains how to do that.

Bob
ludo007 20 Mar, 2010
i have a problem with the registration plugin:

i follow the tutorial so
- i create a form with all the fields
- i entered in the form and check email result
- i enable validation
- i configure the imageverification
- i enable joomla registration
- i enable the server side validation
- i linked the form to the joomla registration plugin

and i have no bug but the user is not registered and i do not receive anu mail. i attach a backup of my form please help ..😶
GreyHead 20 Mar, 2010
Hi ludo007,

The Joomla Registration plugin settings are not included in a cfbak file so I can't check those. But . . .

a) it looks as though the plugin is not enabled in the form plugins tab so the regsitration won't work

b) there is not email setup in the Form itself so you won't receive any emails from ChronoForms. (You should get the regsitration email if you enable the plugin and it is correctly configured.

Bob

PS I suggest that you disable all validation and imageverification until you have the basic form working correctly.
ludo007 29 Mar, 2010
Thanks the registration is ok
but i don't receive any mailand i think that i configure well the plugin, can you tell me what i have to configure exactely and the value to put
thanks
ludo007 30 Mar, 2010
can someone help me 😟
This topic is locked and no more replies can be posted.