You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As can be seen here, some people run into trouble when using the form helper, as their options as 'ignored'. I've seen this happen once or twice before as well.
Simply put, this is happening because they are trying to apply the manual visits signature to the form helper, of which the 2nd argument isn't 'data' but rather 'options' (the 3rd argument on manual visits), because unlike manual visits the form helper is already aware of the data that's being submitted.
As a result, when people try to use the form 'incorrectly', they still see the request passing through with the correct data, but they see their (3rd argument) options (e.g. event callbacks) being ignored, making them believe their code is correct but Inertia has broken behaviour.
Proposed Solutions
Document the form helper signatures/differences, OR
Log a console error detailing the mistake when providing a third argument to the form helper's methods.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Problem
As can be seen here, some people run into trouble when using the form helper, as their options as 'ignored'. I've seen this happen once or twice before as well.
Simply put, this is happening because they are trying to apply the
manual visits
signature to theform helper
, of which the 2nd argument isn't 'data' but rather 'options' (the 3rd argument on manual visits), because unlikemanual visits
theform helper
is already aware of the data that's being submitted.As a result, when people try to use the form 'incorrectly', they still see the request passing through with the correct data, but they see their (3rd argument) options (e.g. event callbacks) being ignored, making them believe their code is correct but Inertia has broken behaviour.
Proposed Solutions
Beta Was this translation helpful? Give feedback.
All reactions