Contents |
ValidForm→addJSEvent
ValidForm→addJSEvent — Binds a jQuery event to the HTML form element
Description
addJSEvent (string $event, string $method);
Binds a jQuery event to the HTML form element.
Parameters
- event
The jQuery event you want to bind to the form element.
- method
The javascript function you want to trigger.
Return values
No value is returned.
Examples
To trigger an alert if a user has submitted the form, use this line of code:
$objForm->addJSEvent("submit", "function(){ alert('You have submitted a VFB form!'); }");

