Skip to content
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

Form Preview Enhancements #26

Open
patrickheeney opened this issue Sep 21, 2013 · 1 comment
Open

Form Preview Enhancements #26

patrickheeney opened this issue Sep 21, 2013 · 1 comment

Comments

@patrickheeney
Copy link

Right now the preview layout is pretty static. We can choose left or right which works in some cases but not all. We should brainstorm on what we can do here since I had to result to hardcoding to pull this off. For example here is the existing preview layout:

screen shot 2013-09-21 at 3 09 29 pm

Here is what I ended up hardcoding to have it do:

screen shot 2013-09-21 at 3 09 36 pm

Perhaps we can have it pass additional settings to a partial. For example $this->add_form_field('city', 'left'); could be $this->add_form_field('city')->formAttributes(array('column' => 1, 'live_edit' => true)); and create a custom partial at some point that that would loop through and pull all the fields with attribute column 1.

Its important to note that this preview layout was only necessary for the /preview/ page and not the preview that happens when you click onPreviewPopup. So perhaps we can use the $context more intelligently and provide /preview/ -> $context = 'preview' and onPreviewPopup -> $context = 'preview_popup';

@EHLOVader
Copy link

A more complex grid structure shouldn't be too complicated to implement for this.

Although then you may need more field_definitions simply for structure, like containers, or clear blocks.

Looking through your layouts again, I wanted to know what sort of custom thing you did.. is it grid like or newspaper column like in the form build out?

grid

- - -
  /
- - -
  /
- - -

newspaper

-  -  -
-/ - /-
-  -  -

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

No branches or pull requests

2 participants