Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Example LiveWhale module
// Save this file in /livewhale/client/modules/mymodule/ and login to LiveWhale to load the module for the first time.
'title'=>'My Module',
class LiveWhaleApplicationMyModule {
public function onFormsSubmission($id) {
global $_LW;
if ($id == 123) { // Replace this with the ID number for your LiveWhale form
// Pull values from fields, checking the form's HTML to get the field names
$field1 = strip_tags($_LW->_POST['lw_form_123_1234567890']);
$field2 = strip_tags($_LW->_POST['lw_form_123_1234567891']);
// etc.
// Put the rest of your script here, including any create() or update() actions based on your form.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment