-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
quick to make fields with labels (or multi-field fields) (via templates and groups) #778
Comments
@ebrehault our plan is to implement this as part of the doing the palette for the IDE. Any feedback would be helpful before we start. |
Sounds very interesting but not easy :) I guess "layout" is probably confusing, it is usually named "templates" (that's how TinyMCE and CKeditor call them at least). |
I think its not hard. I have an idea on how to solve the rename problem @ebrehault. When a template is inserted we wrap it in a noneditable which groups the template. This group can be renamed or ungrouped. Each of the fields within the group can still be editable even while grouped but they can't be rearranged. Tinymce noneditable allows for this. |
I tested the groups idea with the tinymce noneditable plugin. Works well For example the following allows me to drag around the whole group while still allowing me to edit the field inside it. You can also drag the field outside of the group. not sure if that is a plus or a minus but its a bit tricky to drag it back into the group again as the slot will close up. Might be able to solve this with a min width or something
|
User problem
Still too many clicks to create a typical form.
Should be one click to get:
Options
Templates (stencils?)
Implement the palette and have it display templates.
Templates are forms contained in the imported macro dbs with names that slart with
template_
.The template will be inserted into the layout as a group. A group is a special non-editable html with a id. This allows the group to be dragged as one who unit within tinymce. Nonedititable mode in tinymce allows for editable sections within noneditable. This should allow the fields etc within a group to be selected and settings edited while still being able to move the group within the layout.
Once inserted a copy is made of all their contents with a new unique prefix or postfix.
There will be a group and ungroup button to create groups anytime (in tinymce toolbar? or perhaps when selecting in tinymce the fields settings tab should show create group button?).
A group can be renamed. Select the group, go to group settings (2nd tab) and change the id. Doing this will find all the elements contained in the group and prefix each.
e.g.
template_phone
and contains fieldscountry_code
andnumber
.phone_1
(or what ever to make it unique) and the fields arephone_1_country_code
andphone_1_number
.patient_phone
. The fields get renamed topatient_phone_country_code
andpatient_phone_number
.Could also call this
Advanced
Plan
The text was updated successfully, but these errors were encountered: