Form builder
We need a proper way of building forms. No idea how to do it yet.
Can you provide more details on this?
Well since I've made this issue, I've also implemented view components: https://tempest.stitcher.io/framework/04-views#content-view-components
On top of that, I've made a handful of components that are shipped with the framework: https://github.com/tempestphp/tempest-framework/tree/main/src/Tempest/View/Components
I reckon the "form builder" will consist of improved versions of these components.
- Would it support custom themes?
- What's the scope? Is it primarily to show native HTML5 form elements but with model values and old values filled in automatically like Rails?
<%= simple_form_for @post do |f| %>
<%= f.label :title, "Title" %>
<%= f.input :title %>
<%= f.label :content, "Content" %>
<%= f.input :content %>
<%= f.button :submit, "Create" %>
<% end %>
The idea is that you'll be able to publish these components if you want custom themes. That functionality is not added yet though
My personal opinion is that this would be better being a separate first-party package instead.
I think this should be first-party if lightweight, eg. just a few good headless components to facilitate working with errors, CSRF etc
We actually have a base for this now.