Changing Required Properties in Input Fields To Optional
Submitted by Zusan on Wed, 06/16/2021 - 15:55
Forums:
Hi,
I would like to edit the required input fields for some content types, and change them to optional fields instead. Does anybody know which .php file (or files) I would need to modify in order to achieve this? Thanks.
otacke
Wed, 06/16/2021 - 21:55
Permalink
Hi Zusan!You would not write
Hi Zusan!
You would not write in the code directly, but use the "alter semantics" hook to override existing or set new values. That way you don't lose your changes when you update content type libraries. Please note, however, that there's most likely a reason for a value being mandatory and that content may not work as expected if you leave it out.
Please find more information at https://h5p.org/node/2692 and https://h5p.org/semantics
Best,
Oliver
Zusan
Thu, 06/17/2021 - 22:09
Permalink
Thank you!
Many thanks for the very helpful reply. Much appreciated!