forest-rails
forest-rails copied to clipboard
Smart Action, unpredicted behaviour (?) field value
I don't know if this is normal behaviour, but if it is, maybe you should specify it on the doc. When you have a in your smart action and you submit the fields to the action, somethimes the field is blank, sometimes it submits no field.
Expected behaviour
Field value to be always blank or always not present. But not both.
##Â Actual behavior
not present case:
- Click on a smart action with fields button
- Opens the fields view
- Click on submit button
This gives us
fields: { }
blank case:
- Click on a smart action with fields button
- Opens the fields part
- Click on the field
- Click outside the field
- Click on submit button
This gives us
fields: { "name of field": "" }
Failure Logs
none
Context
not relevant, or if so, ask and I will provide.
Hi @daniel-costa, thanks for the report. I think the expected behaviour is to always have the "not present" case in both usecases.
I get it from the "rails" perspective. My concern is more in the UX logic. When does the user chooses it has to be sent and has to be blank? And if he is aware of it, how could he revert blank to nil.
For example, if it is established the rule "If you focus the field, then the value becomes it's content. Therefore an empty field will result in a blank field." . What about the user going to a field and using tab
to go to the next ones. He might go in a field and set it to blank while he was trying to move trough the form.
Anyway, I thought you should be aware of the behaviour and maybe reference it somewhere in the documentation.