SproutCMS

This is the code documentation for the SproutCMS project

function changeFieldRequired()

Modify a JSON form config to change the 'required' status of a particular field
This implements JsonForm::makeOptional and JsonForm::makeRequired

Usage

void JsonForm::changeFieldRequired ( array &$conf , string $field_name , bool $required );

Arguments

  1. array $conf (by reference)
    The JSON form config
  2. string $field_name
    The name of the field
  3. bool $required
    True for required, false for optional

Return value

  • void