Description
Describe the problem you're proposing to solve
Since the show and edit are on the same page it would be good to be able to put custom HTML tags that aren't submitted as well. For example, there is no easy way to display a big image on the show/edit page. I know that this can be done via custom Ecto type but in my case, I already have a custom Ecto type from my upload lib (Arc/Waffle). Also, I'm not a fan of adding an admin logic code to the application code.
Describe the solution you'd like
be able to add custom html tags to show/edit form so something like:
def form_fields(_) do
[
status: %{choices: [{"Valid", "valid"}, {"New", "new"}, {"Invalid", "invalid"}]},
id_card_front: %{name: "ID Front", type: :safe_html, value: fn v -> "<img src='#{v.url}'" end }
]
end
Describe alternatives you've considered
I was considering going with a custom page for the moment.
Additional context
Add any other context or screenshots about the feature request here.
I can try to implement it but first, I need to know whether this kind of approach is ok with you guys. Or maybe you know some other alternatives that don't require a custom Ecto type since.
Cheers
Piotr