Articles in this section
Category / Section

6.5.1 Repeat buttons

Published:
Updated:

Buttons in the repeat listing

In the Repeats tab you can set various options that determine the buttons shown in the repeat listing.

671.png

With “Show subform keys” and “Show ‘Copy’ subform button” selected, the repeat table will look like this:

672.png

The number 1 to the left is the subform sequence number. This number is by default shown in the repeat listing for each repeat line.

The subform key is an internal ID number for this repeat line. It is by default not shown.

The […] button has a dropdown menu leading to a Copy option and a Delete option. See picture above. If only one of these is selected to be shown by the form designer, they will appear as individual Delete or Copy icons, as shown below:

The Delete button is by default shown to the right for each repeat line:

673.png

You can also switch on the Copy subform button:

674.png

This button is by default not shown. When switched on, and the Delete button switched off, it will appear as in the picture above. We have there pressed the Copy button for the second line to create a copy of it below, in the third line. When that is done we can click on the third line to change some of the data and save it.

When both the Delete and the Copy subform is selected, they will appear in the dropdown menu as described above.

You can style these buttons as you wish: change the text, icons, colors and size of each button. One example is shown in the picture further up, of the repeat table with individual column widths and photos of PC repairs. There the [+Add] button has been renamed [Repairs made], it has a spanner icon and company brand colors. Read more about the styling of buttons in Designing: 4.2.3 Styling tab.



Buttons in the repeat window

From Zegeba v 4.4, you can create your own buttons to be used in the repeat window, instead of the standard green [OK] and red [Cancel] buttons. Then you can style the buttons and e.g. give them your branding colors. You can also add extra actions to the buttons, such as setting a specific parameter value when Save is pressed, in addition to saving the entry.

  1. Add two Link buttons at the bottom of the repeat, for instance by placing them right justified inside a grid with no borders.
  2. In the Reference fields of these Link elements, set in the Save button: action://saveopenrepeat|<ID of Save Link button>
    In the Cancel button:
    action://cancelopenrepeat|<ID of Cancel Link button>
  3. You can also combine several actions in one button with & between the actions. In this command, the value 1 is set in the repeat’s element counter-element before the repeat is saved and closed: action://setValue|counter_element|1&saveopenrepeat|save_button| Remember to put the save command last and put a | character at its end.
  4. Then go to the repeat element’s “Other” properties tab and select Hide the [OK] and [Cancel] buttons in the repeat window.
Was this article useful?
yes
No
Help us improve this page
Please provide feedback or comments
Access denied
Access denied