Introduction
The Button Object is an an associative array. Part of the Form Object it controls the way a form button is displayed.
Usage
// Get the submit button type.
$type = rgars( $form, 'button/type' );
// Set the submit button text.
$form['button']['text'] = 'the button text';
// Get the previous button type.
$previous_type = rgars( $form, 'lastPageButton/text' );
Properties
Param | Type | Description |
---|---|---|
type | string | Specifies the type of button to be displayed. Possible values: text : Displays a standard submit button (i.e. <input type="submit" /> )image : Displays an image button (i.e. <input type="image" /> ) |
text | string | Contains the button text. Only applicable when type is set to text . |
imageUrl | string | Contains the URL for the image button. Only applicable when type is set to image . |
conditionalLogic | null|array | Only applicable to the submit button. Controls when the button should be visible based on values selected on the form. See Conditional Logic Object |
location | string | Since v2.6 Only applicable to the submit button. The button location. Possible values: inline : Positions the button on the same row as the last field. Note: The submit button cannot be placed inline with other content on a multi-page form.bottom : The deafult position in the form footer. |
width | string | Since v2.6 Only applicable to the submit button. The button width. Possible values: auto : the width matches that of the button text.full : the width expands to fill 100% of the container. |
layoutGridColumnSpan | integer | Since v2.6 Only applicable to the submit button. The number of layout grid columns the button spans. Possible values: 3 , 6 , 9 , or 12 |