Maybe I’m wrong, but this doesn’t seem to make sense to me.
If I mark an address field (which is what I believe a field set containing multiple individual fields) as REQUIRED, I would expect that every active sub field of the address field would be required.
But it doesn’t seem to work this way.
The user can just leave out any sub field and still get the form submitted without error message as long as there are just some sub fields filled.
So basically making the address field REQUIRED does not make each of the individual sub fields required.
Or am I missing something?
All inputs of an Address field, except Address Line 2, are required by default.
This can be changed using custom code, so if you’re getting something different, I would recommend you to check your theme functions.php file looking for custom code (search by gform).
If you can’t find any custom code, I would recommend you to perform a full conflict test: Testing for a Theme/Plugin Conflict using the Health Check & Troubleshooting Plugin - Gravity Forms Documentation
Oh I see. Yeah the field line 2 is actually the one causing the concern. Is there a way to make it required as well?
Otherwise I’d have to disable the line and create an additional text input field.
Many thanks for the response.
You can use the gform_field_validation filter to change that behavior. See example three here:
That is the method you can use, but you will need to modify slightly to require all parts of the address field.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.