Refresh container with required input without showing 'Required Field!' warning

There should be a simple solution, but I cannot seem to find it. I have some steps I am taking the user to where I refresh containers to make them visible and not visible, inside those containers there inputs and where I have mandatory inputs.

So when I refresh this container, it automatically shows a warning message that the code is a mandatory input, even though it is the first time the user is seeing this and has not attempted to click next yet.

How do I avoid showing that warning message straight away?

Solution

Hi André,

When you use a Container's Visible property, you are just hiding the container, but it's still on the HTML page (along with its Inputs). This means that if you previously (ajax-)submited the form where that container is, those fields will have been validated and considered invalid by the built-in validations. When you Ajax Refresh to show the container, the Input is invalid and displays as such.

My suggestion is to use IFs around your containers, as these will not add the Container (and its contents) to the page unless the Condition is met (which would mean there was not a prior validation for that input).

Hope this helps

Solution

Thanks Jorge, makes sense.