Allow Non-Model Fields to Render on Forms Without Writers #4124
Paul-Bob
started this conversation in
Feature requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Right now, if we want to add a field to a resource edit view, it only shows up if the model has a writer for it.
For model attributes, the writer is already automatically defined, but if we want to add a field with an ID that’s not a model attribute, we need to manually add a writer to that model.
For example:
Let’s add a new configuration option that allows the
extra_infofield to be rendered on forms without needing to add a writer to the model.Possible configuration options
show_on: :formsrender_on_forms: trueforce_render_on_forms: truevirtual_field: trueinclude_in_forms: trueexpose_on_forms: trueallow_form_render: trueI think
show_on: :formsis the best candidate yet since we already use it for the same use-case on tools.Beta Was this translation helpful? Give feedback.
All reactions