Skip to content
This repository has been archived by the owner on Jun 22, 2020. It is now read-only.

create a template DSL for search forms #2

Open
jeremybmerrill opened this issue Oct 20, 2015 · 0 comments
Open

create a template DSL for search forms #2

jeremybmerrill opened this issue Oct 20, 2015 · 0 comments

Comments

@jeremybmerrill
Copy link
Contributor

There's a lot of boilerplate in the search_form templates. A DSL to "automatically" add that boilerplate (form-group, form-notes, etc. etc.) to distinguish the interesting content from the boilerplate would be really neat.

YAML might be a good place to start, so a template looks like:

fields:
  - title: Full text
    input: <input name="search" id="search" class="form-control" placeholder="Your query..." value="{{= search.query_string.replace(/\"/g, "&quot;") }}" type="text">
    notes: my notes whatever they are

Or:

fields:
  - title: Full text
    input: text/query_string
    notes: my notes whatever they are
  - title: Subject
    input: text/subject
    notes: my notes whatever they are
  - title: Date sent
    input: daterange/sent
    notes: my notes whatever they are

(This idea isn't fully developed, but has a lot of freedom for how to implement it.)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant