DanielD Posted July 30, 2021 Share Posted July 30, 2021 Hello. I have a problem regarding getting the selected select field value in a hook after a form is submitted but before the email is sent. I tried different ways: $form->getChildByName('store'); $form->getChildByName('store')->get('value'); $form->getChildByName('store')->get('selected'); When i dump these with bd() i get a result only on the first line. The other two returns 'null'. I looked everywhere on the forum, and documentation but can't figure out how to get the selected value. Thanks in advance. Daniel Link to comment Share on other sites More sharing options...
elabx Posted July 30, 2021 Share Posted July 30, 2021 Can you try: $form->getChildByName('store')->attr('value'); Link to comment Share on other sites More sharing options...
DanielD Posted August 2, 2021 Author Share Posted August 2, 2021 Hello. Yes i did. I get the same 'null' result. Strangely this get->('value') or ->attr('value') works on select on another site. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now