Problem/Motivation
I found that my users get frustrated because they receive the error:
You need to enter a value for other tip.
When they clearly have hit a radio button for a tip. It's even still selected for them.
Steps to reproduce
Proposed resolution
Why not use the submitPaneForm functionality to add the tip to the order?
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork commerce_tip-3564305
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
generalredneckSo The error message here was part of #3564307: Cannot add tip. That said, this is still a usability option IMO incase they forget to hit the "Add" button but have an item selected. I think this will make it so that store operators dont' miss out on much wanted tip transactions due to a usability issue and the user not noticing or not wanting to go back and correct it.
Comment #3
generalredneckAs an FYI this will require some duplication of AddTip since that function and the submitInlineForm() function seem to handle how to grab from $form_state a bit differently.
Comment #4
generalredneckFYI I created a custom module to overload the contrib module's InlineForm because I wanted to do some other work around building the form as well... This is what I ended up with in my submit handler:
The differing code is in the first lines... addTip has
Where mine has
and then goes on to reference the values in the
$valuesvariable using the full array key syntax like$values['tip_info']['tip']instead of$values['tip']Hope this helps.