Example LiveWhale module
<?php | |
// Save this file in /livewhale/client/modules/mymodule/ and login to LiveWhale to load the module for the first time. | |
$_LW->REGISTERED_APPS['my_module']=array( | |
'title'=>'My Module', | |
'handlers'=>array('onFormsSubmission'), | |
); | |
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