The best way to describe the problem is to show it...
In the following page: https://odc-community-l145-dev.outsystems.app/TestApp/Page1I've created a form containing a required input and a button that triggers built in validations which works fine:
In the following page: https://odc-community-l145-dev.outsystems.app/TestApp/Page2 I moved the form inside tabs, which continues to work:
In the following page: https://odc-community-l145-dev.outsystems.app/TestApp/Page3I moved the tabs to a new block and simply use the block in the page (instead of having tabs directly in the page) and...
Clicking Save, nothing happens.
Any clue?
Thanks
Hello.
So you have the inputs in a block and that block inside a form?
I've never done and I assume it doesn't work:
A block can have multiple instances on the same page. If means the same input would exist multiple times in the same form!
Form validations assume that the form has knowledge of all the inputs inside so it can edit the ValidationMessage, and see the widget.IsValid to determine the form.IsValid.
If you want the inputs to be on a block, the form must be in that block.
If you're placing inputs inside a block and then wrapping that block inside a form, it may not work as expected.
The reason is that a block can have multiple instances on the same page, meaning the same input fields could exist multiple times within the same form. This creates issues with form validation because:
If you want inputs to be inside a block, the best approach is to keep the form within that block rather than placing the block inside the form. This ensures the validation logic remains intact and works as expected.
To clarify previous answers:Page contains the Block (nothing else):
And the Block contains the form inside a TAB:
Button simply:
Can't open your file.
Tried it myself and I don't get the same problem
I'm facing the problem in ODC not OS11
Yes, that's where I'm doing this
Hi @Dorine Boudry,
I noticed that you have "form in block in tab" and this is different from what i have "form in tab in block"
I also recreated what you described (form in block in tab) here: https://odc-community-l145-dev.outsystems.app/TestApp/Page4and it works.But this is not the scenario i want.
Thank you to keep looking into this.
Ah, yes, I got that wrong.
I can now reproduce the problem, and agree it must be just one render not happening.
The validation is getting executed, and as soon as I start typing, the validation message does appear.
I agree this is a bug / oversight, @Gonçalo Martins : is this for the platform or for the OutSystems UI team ??
A workaround, is to add the validation message in an expression with style display:none, that forces a render.
Dorine
I have new findings on the problem.I believe the problem might be related to a missing render when content lives inside placeholders.
Why?
1) I recreated a block with tabs behaviour using containers and placeholders, and i ended with the same problem;
2) Please open : https://odc-community-l145-dev.outsystems.app/TestApp/Page3 then click 'Save' (no message will appear) then input something in the input and you'll see that the error message will appear:
New OML Version