View Issue Details

IDProjectCategoryView StatusLast Update
0006010OXID eShop (all versions)1. ----- eShop frontend -----public2017-06-29 11:13
Status acknowledgedResolutionopen 
Product Version4.8.8 / 5.1.8 
Target VersionFixed in Version 
Summary0006010: Form validation does not check whether a dynamic form field has any values or not
DescriptionIf you add "oxuser__oxstateid" to the aMustFillFields for the registration and a country does not have a state you will get an error message.
Validation should only take effect if the selected country has got a state to select.
Steps To ReproduceGo into the OXID admin-> Master Settings-> Core Settings-> Settings -> Other Settings -> Mandatory fields in User Registration Form.
Add "oxuser__oxstateid" right there.
Then go to the registration page and try to register with a country, which does not have a state to select.
TagsNo tags attached.
PHP VersionNot defined
Database VersionNot defined



2015-01-13 16:06

reporter   ~0010607

Last edited: 2015-01-13 16:06

View 2 revisions

I changed the subject slightly to clarify to topic. This behavior is not specific to the oxuser__oxstateid field, but applies to any dynamic form field. A dynamic form field is a field which can have different values, depending on the value of another form field.

In this particular case, the values of the oxuser__oxstateid field change depending on the country which was selected (as obviously Germany has other states than the US, for example).

We created a form validation which is as generic as possible, but can be extended for project specific needs. You could write a module which enhances the stock validator by this feature. The place to extend should be this one:

From my point of view, this is a feature enhancement: Extend the validator in such a way that it is aware of dynamic fields and validates those fields only if there are any options (=values) to display at all. I will put it on our Product Backlog, and we would be happy to get a contribution for this.

As for now, we should update our documentation and point out that adding a dynamic field to the $aMustFillFields might have side effects, if the dynamic field does not have any values.