[TYPO3-english] formhandler multistep form

Reinhard Führicht rf at typoheads.at
Wed Oct 6 15:03:42 CEST 2010


Hi,

yes, sadly Formhandler is a bit slow currently.
The stable version 1.0.0 will hopefully be faster.

As far as I know, the main reason for the slow performance is the 
ComponentManager, which consumes much time and memory to automatically 
find and include requested classes. We have some plans already to 
increase the performance, but it will take some time to figure out a 
good solution.

Regards,
Reinhard

Am 2010-10-06 14:05, schrieb Toshiyuki Toda:
> Hi list
>
> This is done! Thank you, Reinhard.
>
> But this sample is not OK in 0.9.8, in 0.9.9 is OK.
> I think that formhandler is slow to display and it is only wrong point
> for this extension.
> Can I improve this point? Where is overhead?
>
>
>
> (2010/10/05 16:30), Reinhard Führicht wrote:
>> Am 2010-10-04 23:25, schrieb Toshiyuki Toda:
>>> Hi list.
>>>
>>> I use extension formhandler.
>>> I want to make multistep form with conditions below.
>>>
>>> pattern 1: FORM1 -> FORM2 -> FORM3
>>> pattern 2: FORM1 -> -> FORM3 ( skip FORM2 in some condition )
>>>
>>> Can I do ? if you know, please tell me how to do.
>>
>> Hi Toshiyuki,
>>
>> yes, you can do this with Formhandler.
>>
>> In your HTML template you can "double define" steps.
>>
>> Example:
>>
>> ###TEMPLATE_FORM1###
>> Step 1 is always the same in your case.
>> <br />
>> <form action="###REL_URL###" method="post">
>> ###HIDDEN_FIELDS###
>> <input type="radio" name="formhandler[pattern]" value="1"
>> ###checked_pattern_1### />Pattern 1<br />
>> <input type="radio" name="formhandler[pattern]" value="2"
>> ###checked_pattern_2### />Pattern 2<br />
>> <input type="submit" ###submit_nextStep### value="next" />
>> </form>
>> ###TEMPLATE_FORM1###
>>
>> ###TEMPLATE_FORM2###
>> This will only be shown in "pattern 1".
>> <br />
>> <form action="###REL_URL###" method="post">
>> ###HIDDEN_FIELDS###
>> <input type="submit" ###submit_prevStep### value="prev" />
>> <input type="submit" ###submit_nextStep### value="next" />
>> </form>
>> ###TEMPLATE_FORM2###
>>
>> ###TEMPLATE_FORM2_B###
>> ###TEMPLATE_FORM3###
>> This will be shown as step 3 in "pattern 1" and as step 2 in "pattern 2".
>> <br />
>> <form action="###REL_URL###" method="post">
>> ###HIDDEN_FIELDS###
>> <input type="submit" ###submit_prevStep### value="prev" />
>> <input type="submit" ###submit_nextStep### value="next" />
>> </form>
>> ###TEMPLATE_FORM3###
>> ###TEMPLATE_FORM2_B###
>>
>>
>> You can configure these patterns with conditions:
>>
>> plugin.Tx_Formhandler.settings.predef.conditions_example {
>>
>> name = Conditions example
>> templateFile = fileadmin/path/to/your/template/template.html
>> formValuesPrefix = formhandler
>>
>> # Conditions for step 1
>> 1.if.1 {
>> conditions {
>> OR1 {
>>
>> # If the user entered a special value
>> AND1 = pattern=2
>> }
>> }
>> isTrue {
>> 2 {
>>
>> # set the suffix to _B, so ###TEMPLATE_FORM[X]_B### is taken
>> templateSuffix = _B
>>
>> # Optional: Reconfigure error checks if needed
>> #validators.1.config.fieldConf.phone.errorCheck.1 = required
>> #validators.1.config.disableErrorCheckFields = street
>> }
>> }
>> }
>> }
>>
>>
>> This is actually a working example. You can just copy paste the code,
>> configure the path to the template file and try it out.
>>
>> Kind regards,
>> Reinhard
>



More information about the TYPO3-english mailing list