&stepTpl in renderForm - has it been removed?


(Jon Leverrier) #1

I’ve just been taking a look at the latest version of Formalicious after upgrading from v1.3.0 to v1.4.4 and noticed that one of the parameters in the renderForm snippet has been removed :frowning_face:

The parameter that has been removed was &stepTpl.

I was using this to extend the default stepTpl chunk with a custom snippet to display custom step indicators, such as…

and

…which really made Formalicious feel complete.

Any chance this might be added back any time soon?


(Jon Leverrier) #2

So, just been looking through the code, and it’s all been re-factored :slight_smile:

I guess my question then, is how do I override the stepTpl parameter that’s in FormaliciousHookRenderForm hook?


(Gauke Pieter Sietzema) #3

This was unintentional. We’ll have a look at it Thursday.


(Jon Leverrier) #4

Thanks @Sterc!

Just to clarify, &stepTpl hasn’t been removed - it’s just been moved into a hook now, and i’ve found a way to override that particular default chunk :slight_smile: It just caught me off guard :slight_smile:

If renderForm snippet no longer has access to that parameter, I can work around it using different &formTpl.

It’s a great update btw! Great work!!


(Oene Tjeerd de Bruin) #5

Hi @jonleverrier

A temporary fix is to change the following code in the FormaliciousHookRenderForm hook:

$stepTpl = $modx->getOption('stepTpl', $scriptProperties, 'stepTpl');
$stepParam = $modx->getOption('stepParam', $scriptProperties, 'step');

to:

$stepTpl = $modx->getOption('stepTpl', $formit->config, 'stepTpl');
$stepParam = $modx->getOption('stepParam', $formit->config, 'step');

And add the stepTpl to the FormIt call in your formTpl chunk:

&stepTpl=`chunkname`

(Jon Leverrier) #6

Thank you @Oetzie!

I’ll give this ago, however it works without changing the current code :thinking:

If I just add &stepTpl=`chunkname` to formTpl - it works.