Forms Module & other Form Builder forms

edited March 2018 in Modules

I'm using the Form module to allow CMS generated forms. I also have another Form Builder generated form in my templates. The CMS one renders before the template one. I've just noticed that if the form() helper is used in the WYSIWYG, the other form inherits its reset button. The template form uses form_builder->reset() before initialize(), so I was surprised to see the reset button appearing. What do I need to do to prevent this, and I suppose other 'form' configurations not present in the template one might also appear if specified by the CMS form() (eg 'Cancel')?

Comments

  • edited April 2018

    This looks like it an issue in how it is implemented. It's sharing one Form_builder instance for each and the reset doesn't clear everything out. A cleaner way would be to have a separate Form_builder instance for each rendering. I've pushed a potential fix to the develop branch for you to test out:
    https://github.com/daylightstudio/FUEL-CMS-Forms-Module/tree/develop

    It also includes some updates for the ReCaptcha (which will be outdated come Saturday).

  • OK, I will try that out today, thanks for that!

  • Yep, that fixes it!

Sign In or Register to comment.