I need to create #states conditions between either the fields in any one element in a webform or across other elements in the same form. I'd hoped I could do it via the WF yaml editor but it seems I couldn't . As per @jrockowitz 's comment on the attached link #1, I
might be able to use a form alter hook to add the needed #states
I am not a developer but it seems with drupal 8+ I do need to learn to start to be one and that's on my list for sure. I'd love to be able to contribute something to Drupal and especially webform but I find the learning process intimidating especially with the lack of "beginner-type" tutorials at least when it comes to creating custom modules with more than "hello world!".
For now, I need to know the steps I need to follow @jrockowitz 's advice and use hook_form_alter to serve my goal. My understanding is that could be done either on a theme level or custom module level (please correct me if wrong) and since I'm more comfortable with the theme way and I feel it's simpler for someone like me, I like to know (at least):
- which files ( other than MYTHEME.theme) I need to edit or/and create to start with and
- what info do I need to look for and study so I can do the job and begin my learning journey.
- I learn best by example and so any extra clear a-b-c type tips to get me started is greatly valued if any.
If the custom module way is more advisable or the only way:
- What is the minimal skeleton of a custom module that I need to have for the purpose.
- What do I need to study to learn how to create such a module.
(I'm not sure if the last question should be a separate question so please forgive my newbie status here but I promise I've done my best)
Thanks so much everyone