Hi @andrepereiradasilva ,
Is there a solution to use a required field that depends on the selection of another field with showon?
Although the required field is not visible it is verified on the form.
<field
name="field1"
type="checkboxes"
default="0"
label="Field1">
<option value="0">JNO
<option value="1">JYES
</field><field
name="field2"
type="text"
label="Field2"
required="true"
showon="field1:1" />
Thank you!
We only hide the field using CSS, thus the field is still there.
You can't have a required field which is invisible. You would have to add own JS logic to remove the required attribute/class when hidden if you need that.
I'm closing this issue as I don't think that is something which core needs to do.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-03-15 12:06:45 |
Closed_By | ⇒ | Bakual |
Labels |
Added:
?
|
@brianteeman this is not an issue. can this be closed
Reggarding your question, I think so, but will only work on 3.5.0+.
Maybe with,
showon="field1:whatever[AND]field2:whatever"
on the third field