4a. Adding form fields : Add Row - CodeBlueG/PSForms GitHub Wiki
The form is filled in a sequential manner by column, starting from the top left.
Adding a new field is carried out using two commands, the first adds a new row to the form, with some size settings, and and the second adds the field itself.
Adding a new row
A new row is added with the "Add-Row" cmdlet and is also used to add new columns to the form. This cmdlet will need to be added to the form variable and has the following parameters;
- FormObject
- rowsHigh
- newColumn
formObject
This is a mandatory field
Enter the name of the form that you are creating, this is the same as the name used in the "Initialize-Form" cmdlet.
rowsHigh
The number of rows high that the field (added with the next command) will be. This is how the height of form fields can be changed. The default value is 1 so this can be left out for a 'normal' sized field.
newColumn
Adding this switch will create a new column so that the next form field will be added to the top of the form.
Examples
Add-Row -formObject $TestForm
Will add a single row to the test form
Add-Row -formObject $TestForm -rowsHigh 2 -newColumn
Will add a new column to the form and the first field will be double the normal height