Jump to content

[solved] Is it possible to make 1 subfield of a Textareas Profield required and 1 not?


Recommended Posts

Posted

Hi,
the use case is that I have a Profields Textareas inputfield with 3 subfields that I call A, B, C in the example. The user should have to fill in A & B, but not C. C is optional and only used in under 10% of all entries.

Is it possible to define a requirement for selected subfields of inputfields without a hook? Or need I to use a hook for that? If yes, is there one other or better then Page::SaveReady? Any hint is appreciated. ?

 

Posted
2 hours ago, horst said:

Is it possible to define a requirement for selected subfields of inputfields without a hook?

Yes, by appending an asterisk to the field name in "Textarea Definitions".

2021-02-05_115846.png.d99c12e1f8a424c65f5b820fff2c07a8.png

  • Like 1
  • Thanks 1
Posted
1 hour ago, Robin S said:

Yes, by appending an asterisk to the field name in "Textarea Definitions".

Oh yeah, that's good news! ?

And also requiredIf is possible too!

Thanks @Robin S

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...