Latest Register Log In

+ Advanced Search

Multi-Step Submission Templates

Multi-Step Submission Templates
By
Oct 09, 2011 (Edited Mar 11, 2014)

Sometimes, you may want to break the long submission page (let's assume "submit listing" for example) into multiple steps. As of version 6.2.6, you can make custom templates for each additional step.

Go to the template editor at Admin Panel -> Themes -> Manage Templates. In the regular submit listing template, find the submit button HTML -- in a multilingual install it'll be

<button type="submit" name="processform" value="1" class="submitbutton">{LANG_GENERAL_SUBMIT}</button>
, in an english-only install the {LANG_GENERAL_SUBMIT} will be replaced with "Submit". Change this button to
<button type="submit" name="step" value="yourstep2" class="submitbutton">Continue to step 2</button>
.

After saving that, find the create a custom template area toward the bottom of the template editor page. There, create a custom template named yourstep2template (or whatever name you put in step 2 button value). Copy the contents of the submit listing template into there and remove all parts you don't want to be on the step 2 page (and remove everything from the submit listing template that you don't want to have on the step 1 page).

You can create a step 3 simply by using
<button type="submit" name="step" value="yourstep3" class="submitbutton">Continue to step 3</button>
as the submit button html of step 2. For the final page, the submit button will be the original code but you'll need to modify the preview button to specify the template of your final submit page... if that's submitstep2.tpl, use
<button type="submit" name="processform" value="1" class="submitbutton">Submit</button>
<button type="submit" name="preview" value="submitstep2" class="previewbutton">Preview</button>


To present a button which when pushed will take the user to a previous step, use
<button type="submit" name="step" value="suggestlink" class="submitbutton">Back to step 1</button>

Replace suggestlink with the appropriate step's template if it's not going back to the first step.

Warning: The CAPTCHA/challenge, WYSIWYG description and any file uploads have to be on the final step of the submission in order to work.





Description Splitting a submission into several pages of data connection.
Rating
Views 371 views. Averaging 0 views per day.
Similar Listings