CMS Made Simple API

CmsFormUtils
in package

FinalYes

A static class providing functionality for building forms.

Tags
license

GPL

author

Robert Campbell

since
2.0

Table of Contents

Methods

create_dropdown()  : string
Create an advanced select field.
create_option()  : string
A simple recursive utility function to create an option, or a set of options for a select list or multiselect list.
create_options()  : string
Create a series of options suitable for use in a select input element.
create_textarea()  : string
A method to create a text area control.

Methods

create_dropdown()

Create an advanced select field.

public static create_dropdown(string $name, array<string|int, mixed> $list_options, string|array<string|int, string> $selected[, array<string|int, mixed> $params = array() ]) : string
Parameters
$name : string

The name attribute for the select name

$list_options : array<string|int, mixed>

Options as per the CmsFormUtils::create_options method

$selected : string|array<string|int, string>

Selected value as per the CmsFormUtils::create_option method

$params : array<string|int, mixed> = array()

Array of additional options including: multiple,class,title,id,size

Return values
string

The HTML content for the