ml-archive/submissions

Allow bootstrap size classing

Opened this issue · 3 comments

Please consider adding a way to add the col tagging. For example, this is what my fields look like:

<div class="form-group row">
  <label for="clientName" class="col-sm-2 col-form-label">Client Name:</label>
  <div class="col-sm-10">
  <input type="text" name="clientName" id="clientName" class="form-control" required>
  </div>
</div>

This is a tricky one because the customization can get quite elaborate and how do I keep the API clean and readable? This is not data so it should not be communicated through the field cache. I could allow for extra parameters in the tag like so: #texgroup("clientName", "col-sm-2 col-form-label", "col-sm-10") but I don't like it so much because the order of parameters seems arbitrary and it is not clear by reading the leaf file what will happen.
I could create a generic tag that takes a body so you could fully customize it like so:

#inputgroup("clientName") {
  <div class="form-group row">
    <label for="#(key)" class="col-sm-2 col-form-label">#(label):</label>
    <div class="col-sm-10">
      <input type="text" name="#(key)" id="#(key)" class="form-control" required>
    </div>
  </div>
}

or I could make the Tags customizable using an init with named parameters for all the customization parameters and then the user would have to register their customized versions of the tags.
What do you think?

We definitely need that regardless. I don't think we'd ever hit a point where the form was 100% based on your templates, so they have to have some way to "provide" the values to the elements.

I 100% agree that we need it. Just need to find out the best way 😃