Welcome Guest, Not a member yet? Register   Sign In
Validate fields if checkbox is not checked
#1

(This post was last modified: 11-22-2021, 11:05 AM by eleumas.)

Hi, i would like validate with "required" some fields only if checkbox is not checked.
https://drive.google.com/file/d/1BIFWo1C...sp=sharing
Is possible? How can i do?

I thought which i could change checkbox in a dropdown and validate others fields only if has been selected a specific value from dropdown (in my case value 2).

PHP Code:
<select name="shipping-method">
<
option value="1">pickup in store</option>
<
option value="2">courier service</option>
</
select

This solution could be more easy? Any suggestion for me? Thanks.
Reply
#2

I think you need the required_without validation rule.

See the docs for more information.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB