LEAP™ 5's form element pickups
Form data in LEAP™ 5 admin modules and content plugins is not submitted via standard HTTP GET or POST requests.
The LEAP™ 5 javascript will auto-collect data entered in form elements if they are given the correct class and object name & id.
A sample input syntax would be:
<input
size="12" type="text"
name="LEAP_aVar"
class="LEAP_mod[$ContentID]"
id="LEAP_aVar[$ContentID]"
value="[string($Feature_Map->find('aVar'))]"
/>
Identifying the form element
Form elements must have both a name and an ID.
Name must be prefixed by "LEAP_"
ID must also be prefixed by "LEAP_" and followed immediately by [$ContentID] to ensure uniqueness.
Text input form elements
In order for your form element name:value pairs to be passed to your save action handler, the element must contain the class "LEAP_mod[$ContentID]".
This applies to: standard text input, textarea, select
Check Box & Radio Button Elements
Check boxes & radio buttons are handled differently by HTML in that they pass multiple values in GET and POST.
LEAP™ handles the auto-collect of all like-named checkboxes & radio buttons by gathering them into a line-break (\r) delimited list when given class of "LEAP_modchk[$ContentID]"
Multi-Select Input Elements
In a similar way to check box elements, LEAP™ handles multiple select elements as a special case.
These elements must have a class of "LEAP_modMulti[$ContentID]" in order to be collected and passed as a comma-delimited list to the save handlers.