Problems when using theme and language selector in header/footer, or using second selector in form.

VictorUlloa, Wed Jan 12 2022, 11:15PM

I created a basic form with labels, edit and combo box.  No database access.

Then added a language and theme selector. They work as expected (using pre-release 270).

Then I added a building block for the header and footer.

Then I use the Default Layout option in the Project properties to set the new building blocks to be the header and footer, and moved the language and theme selectors to header.

(Reasoning: I want the user to be able to change theme and language in a consistent way in all the forms.)

Symptom 1:

If the header building block is created with the "Create with form" option, the page stops rendering after showing the header, the main form is not displayed.

Symptom 2:
If I create the header building block without the "Create with form" option, the page shows ok, but selecting a language or theme and pressing the submit button in the form reloads the page with no changes.
I guess is because the selectors are "out of the scope" of the submit...

So, this is maybe not a bug but a expected behavior.  Can the theme and language selectors be used in building blocks like that?

Re: Problems when using theme and language selector in header/footer, or using second selector in form.
administrator, Thu Jan 13 2022, 11:44AM

By default you should not use a form on a building block as the elements of the form should merge with the main form. By default it is set to false when you select a new module as being a building block. That is also why option 2 should work. We'll investigate and report it as bug if applicable.
Re: Problems when using theme and language selector in header/footer, or using second selector in form.
administrator, Thu Jan 13 2022, 06:52PM

Send to bugtracker