Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Forms in PhixFlow can be built and laid out using drag and drop functionality. If you are new to form building, please see the introductory course: PhixFlow Training - Building Applications

A more detailed description of drag and drop functionality is given below, but the following videos will introduce you to the basic concepts:

Pinning and unpinning

A key concept behind dragging functionality in forms is pinning and unpinning. 

Unpinned components

Unpinned components are placed into the next available space. Pinned components can be placed anywhere on the form, and you can pin the edges to the edges of the parent components by setting the offset between the top, right, bottom and left edges of the component to those of the parent.

Pinned components

This is done using the Positional Settings of the component. The offsets are set as the number of pixels.

Note that if you set the right Positional Settings, this overrides any width set for the component. Similarly, if you set the bottom Positional Settings, this overrides any height set.

Note

control which is next available space using CSS?

Unpinned components are a good idea if your layout is likely to be presented on a variety of different screens of different sizes since the components will simply flow to fit the available screen space.  Pinned components cannot do this and may end up being drawn off the screen resulting in scroll bars (if they are enabled on the parent area) or simply not being visible.

(Notes for pop out hints box: To control which components are drawn on top of which you can add a zIndex css tag in the ‘CSS Properties’ sections of the relevant components.  The value of the zIndex tag should be a number and components are drawn on top of each other in ascending sequence of zIndex numbers.)

Dropping components onto forms to create content

New layout components can be added to a form by dragging and dropping any of the following:

  • a template from a palette or from the repository browser
  • an attribute from a stream (to create the appropriate input field component)
  • a stream view from a stream (to create a stream view component)
  • an action from a stream (to create a button which runs this action)
  • the stream itself (to create a card container component)
  • a dashboard (to create a button which opens the dashboard)

(Note for pop out hint box: In order to drag components onto a form in this way please remember to set up the default component palette to use in System Configuration and make sure that palette specifies which template to use for each type of item being dropped onto the form.)

When any of the above items are simply dragged onto a form and dropped onto another component then, by default, it will be added to the form below the component on which it was dropped inside the same parent component as the component on which it was dropped.  For example, if you have an area inside a form which containers 3 input fields and you drag a stream attribute and drop it onto the second field then a new field will be created below the second input field.

If you want to drop a component onto a specific area of a form and drop the component inside that area (i.e. make that area the parent of the new component) then you should hold down the shift key while you drag and drop the component.

If you want to drop a component into a fixed position as a pinned component then you can simply hold down the control key as you drag the component onto the form.

You can combine these extra keys so if you want to drag a new component to a fixed position inside an existing area then you can hold down the control and shift keys as you drag and drop the component onto the target area.

Dragging components to lay out forms

To move a component you can simply drag the component around the form.

Pinned components will simply be moved and their top, bottom, left and right settings updated to reflect their new position.

Unpinned components will not move but you will see the drag and drop circle move as you move the mouse.  If you drop this circle onto another component then the component you started dragging will have its sequence number changed to be that of the component that you dropped it onto.  This will cause the sequence numbers of all other components with the same parent to be updated and the unpinned components are then redrawn in their new sequence.  If the component you dragged originally had a lower sequence number than the one you dropped it onto then it will be drawn after the one you dropped it onto.  Conversely if it originally had a higher sequence than the component you dropped it onto then it will be drawn before the component you dropped it onto.

Preventing components from being dragged

Sometimes you may find yourself dragging and moving the wrong component by mistake. To reduce the chances of this happening for components which you are unlikely to want to move (such as fixed headers, footers or tab components) you can tick the ‘prevent dragging’ box in the ‘Position Settings’ section of the component editor pane.  This will turn off all dragging for this component including being able to resize the component by dragging the edges.  To allow dragging again simply go to the editor and untick the ‘prevent dragging’ box.

Changing an unpinned component to pinned

If you wish to pin an unpinned component to a fixed position then you can so by holding down the Control key as you drag the component.  With the control key down the component will be converted to pinned component and its top, and left settings will be adjusted to reflect the new position to which you drag it.

Changing a pinned component to unpinned

If you wish to unpin a component so that it floats to the next available position you can simply highlight the components you wish to unpin and then select ‘Unpin selected components’ from the right click context menu.

Changing the parent of a component

(Notes for a pop out hints box: You can see what the parent component is for any layout component either by clicking on the component in the form or looking in the Parent Details section of the editor form.  When you click on a layout component it is highlighted with a green box drawn around it and its parent is highlighted with an orange box drawn around it.  The only exception is for components drawn on the top level area (usually referred to as the form itself) which is never highlighted.)

By default when you drag and drop a component onto an area it doesn’t make the target area the new parent of the component instead, if it is an unpinned component, it simply takes the sequence number of the target area as the new sequence number of the dropped component so that it will be drawn in a new position on the form.

...

Insert excerpt
_Banners
_Banners
namescreen
nopaneltrue

Overview

To divide a screen into multiple sections:

Anchor
palette
palette

Divide a Screen Using a Palette Layout

Some palettes have layouts that have 2 areas contained by a split-view area. For example:

  • Serene Grey - Basic Components → Area Split Image Added

These can be used to divide your screen into separate areas while also providing a splitter which allows designers and users to resize the areas.

Setup

  1. In the screen canvas toolbar, click
    Insert excerpt
    _palette
    _palette
    nopaneltrue
    .
  2. Expand a palette to find a layout that has 2 areas.
  3. Drag the layout from the palette onto an existing area.
  4. PhixFlow creates a layout with the following structure, this example is horizontal but vertical options are also available. 
  5. Image AddedIf you have existing content on your screen this can be dragged into the appropriate area using the repository or layout section. Remember you will need to hold the shift key to drop content inside these areas.

Divide a Screen Using the "Add Area" Options
Anchor
element
element

  1. Right-click a screen.
  2. Click Screen Options.
  3. Use one of the Add Area... options to add a new area for the screen, separated by a dividing line.
    PhixFlow creates a new element in the form of a pane for this part of the screen.
  4. This new element is similar to a black screen and will require a suitable container, such as an area, form or card container in order for you to display content. 
    It may be easier to add one of the complete screens to the new element and remove the items you do not require.

Resizing

To resize a pane, drag its dividing line. This automatically resizes adjacent panes.

To prevent resizing, right-click to display the popup menu and select:

  • Insert excerpt
    _area_lock_width
    _area_lock_width
    nopaneltrue
  • Insert excerpt
    _area_lock_height
    _area_lock_height
    nopaneltrue

Removing a Pane

First, delete any layouts or components in it.

  1. Right-click on the empty pane to display the popup menu.
  2. Select 
    Insert excerpt
    _delete_item
    _delete_item
    nopaneltrue
     Pane
    Anchor
    add-area
    add-area

Learn More