There is an entity form on the website. This entity form has a checkbox with the label Remind me about an event
If the checkbox is checked, I need to display two additional fields in this entity:
- Select list (where reminder message templates will be)
- Field for email (where you can enter an email where to send a reminder about the event)
This needs to be done using formstate
and hook_form_alter
. If I understood correctly the formstate
will show me whether the checkbox is checked and hook_form_alter
will add these two fields if the checkbox is checked.
Can you recommend any articles, manuals, code examples, or videos to do this task?