Forums

Multipage form with dynamic data and user information

klox7 23 Jul, 2015
Hi,

I'm creating multipage form where users will be able to claim existing articles and at the same time register. Form steps (pages) are:

1. Select existing articles from dropdown with dynamic data.
2. Fill user info such as first name, last name, email, phone, address, password... (all fields are required).
3. Preview of entered data.
4. Submit, create account, subscribe user to newsletter, submit email.

I managed to create form. For first step I tried to use autocompleter but went for dropdown instead because I couldn't get the code for db read event right.

For step 2 I'm using field which I would like to use as username. I now I can enter this field in Registration event but can I somehow pass values without spaces, special characters and only with small letters? So if user enters "Scissors & Papers" it will create username "scissorspapers".
Here I would also like to hide value entered in password field. Is this possible?

For the last page I would like to create preview of entered data. Is Session to data event suppose to do this?

Another question is if I can display same text on all form pages below?

Regards
klox7 27 Jul, 2015

For the last page I would like to create preview of entered data. Is Session to data event suppose to do this?



I solved this by adding custom code to last page.
GreyHead 27 Jul, 2015
Hi klox7,

You'll need custom code to do step 2. There are various regex based functions available to do this if you Google around.

Bob
klox7 27 Jul, 2015
Hello,

yes I'm trying to do something with regex. But I have 2 fields. 1st text field where user will enter his company and 2nd for username that will be populated from value from 1st field but without special characters, spaces etc. I just don't know how to pass 1st field value to 2nd with possible checking if username already exists.
GreyHead 27 Jul, 2015
Hi klox7,
<?php
$form->data['username'] = cleanUp($form->data['company']);

function cleanUp($name) {
  . . .
  return $cleaned_name;
} 
?>

Bob
This topic is locked and no more replies can be posted.