Button Object

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

ParamTypeDescription
typestringSpecifies 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" />)
textstringContains the button text.
Only applicable when type is set to text.
imageUrlstringContains the URL for the image button.
Only applicable when type is set to image.
conditionalLogicnull|arrayOnly applicable to the submit button.
Controls when the button should be visible based on values selected on the form.
See Conditional Logic Object
locationstringSince 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.
widthstringSince 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.
layoutGridColumnSpanintegerSince v2.6
Only applicable to the submit button.
The number of layout grid columns the button spans.
Possible values: 3, 6, 9, or 12