#################################### # # # ext: th_mailformplus # # # # by: Dev-Team # # email: dev@typoheads.at # # www: www.typoheads.at # # # # donations welcome :) # # # #################################### ################################################ ############# ATTENTION ######################## # read this section when using multipage-forms # # # showing different forms depending on user selection # ################################################ > [2] -> [4] \ [1] > [6] > [3] -> [5] / [1] ... depending the user selection the next step is [2] or [3] make sure that: - each form has a form-start-tag beginning with "" or "" - fieldnames are enclosed by " eg. Dependancy on JavaScript for multipage-forms: - only works with JavaScript enabled by default. - works without JavaScript by using plugin.th_mailformplus.multipage_without_js = 1 (see example below) In order you do not want to write the
-tag in each step-template, you can define a subpart within the first step template for a starting-block and an end-block. You can use these subparts within each following step-template by the markers - ###STARTBLOCK### - ###ENDBLOCK### Define the subparts like this: ... put your start-form tag here ... everything you write here, will be put in the ###FORM_STARTBLOCK### marker put your inputfields here ... ... put your end-form tag here <-- ...FORM1 end --> in all following steps you can use the markers: ###STARTBLOCK### put your inputfields here ... ###ENDBLOCK### ################################################ # showing different forms depending on user selection # example: if a field [fieldname] has a value [value] the template for step 3 will be FORM3[name of postfix]. if that field had the value [other value], the template for step 3 would be FORM3[name of other postfix] ################################################ use postfixes in subpart definitions to use conditions: by using typoscript conditions you can set a postfix for a specific step. Example: [globalVar = GP:[fieldname] = [value]] plugin.tx_thmailformplus_pi1.multipage.3.postfix = [name of postfix] [global] [globalVar = GP:[fieldname] = [other value]] plugin.tx_thmailformplus_pi1.multipage.3.postfix = [name of other postfix] [global] ################################################ new markers to be used in multipage forms: ###ADDITIONAL_MULTIPAGE### ... make sure you insert this marker in every step between the and
tag This is where the automatic generated JS function and hidden fields are written. If plugin.th_mailformplus.multipage_without_auto_hidden = 1 is set, the ###ADDITIONAL_MULTIPAGE### marker will not contain the inactive steps and therefore, the values from other pages will have to be set manually in the step-templates by input type=hidden. this will result in more work for creating the HTML template, but removes CSS dependancy and renders a "cleaner" HTML (no xform tags). If plugin.th_mailformplus.multipage_without_js = 1 is set, the ###ADDITIONAL_MULTIPAGE### marker will not contain JavaScript functions, since browsing between pages is expected to be realized by respectively (see example below). ###curStep### ... current step shown ###maxStep### ... total number of steps when using multipage forms with conditions be sure not to use this marker because the total amount of steps can not be determined at runtime. ###link_nextStep_start### ... start-tag for next page ###link_nextStep_stop### ... end-tag for next page ###link_prevStep_start### ... start-tag for previous page ###link_prevStep_stop### ... end-tag for previous page ###link_reload_start### ... start-tag for submitting form but stay on the same step ###link_reload_stop### ... end-tag for submitting form but stay on the same step ###submit_nextStep### ... name="" attribute next step (input type="submit" requires TS multipage_without_js = 1) ###submit_prevStep### ... name="" attribute prev step (input type="submit" requires TS multipage_without_js = 1) ###submit_reload### ... name="" attribute reload (input type="submit" requires TS multipage_without_js = 1) settings for file upload defined in TS: ###[name of upload field]_fileTypes### ... allowed filetypes eg. jpg,gif,pdf ###[name of upload field]_fileSize### ... maximum allowed filesize per file ###[name of upload field]_numberOfAllowedFiles### ... maximum number of files that can be uplaoded with this field ###[name of upload field]_numberOfUploadedFiles### ... number of currently uploaded files via this field ###[name of upload field]_numberOfRemainingFiles### ... number of remaining files that can be uploaded ############################################### ############################################### ## EXAMPLE ## ###############################################
###LLL:pers_info###
###error_surname###

###error_email###



###LLL:surname###: ###value_surname###


###ADDITIONAL_MULTIPAGE###
########################################### # step 2 and step 3 (universty) are the same ########################################### ###STARTBLOCK###
###LLL:add_info###
###error_age###

###error_job###
###ENDBLOCK### ###STARTBLOCK###
###LLL:edu_info###
###error_university###

###error_study###
###ENDBLOCK### ###STARTBLOCK###
###LLL:files###
you are allowed to upload ###picture_numberOfAllowedFiles### files.
you can upload ###picture_numberOfRemainingFiles### more files.
allowed file types: ###picture_fileTypes###

###error_picture### ###LLL:uploadedfiles###:
###picture###
###link_reload_start###upload file now###link_reload_stop###
###ENDBLOCK### ###STARTBLOCK###
###LLL:something_else###
###error_something###
###ENDBLOCK### ###STARTBLOCK###
###LLL:feedback###
###error_code###

###error_c###
###ENDBLOCK### Form was submitted (Receiver): surname: ###surname### email: ###email### education: ###education### job: ###job### picture: ###picture### ---------------------- Form was submitted (Receiver):
surname: ###surname###
email: ###email###
education: ###education###
job: ###job###
picture: ###picture###
Form was submitted (User): surname: ###surname### email: ###email### education: ###education### job: ###job### picture: ###picture### ---------------------- Form was submitted (User):
surname: ###surname###
email: ###email###
education: ###education###
job: ###job###
picture: ###picture###
Form was submitted (User): surname: ###surname### email: ###email### education: ###education### job: ###job### picture: ###picture### ---------------------- Form was submitted (User):
surname: ###surname###
email: ###email###
education: ###education###
job: ###job###
picture: ###picture###
Thank you, your request will be answered soon. you have uploaded the following files:
###picture###
  • File is too large!

  • File not allowed!

  • Please select an education

  • Please enter a field of study