What is the name of the event that hold form post data?
if ( OW::getRequest()->isPost()
some like this maybe: OW_EventManager::ON_FORM_RENDER
Thanks
What is the name of the event that hold form post data?
if ( OW::getRequest()->isPost()
some like this maybe: OW_EventManager::ON_FORM_RENDER
Thanks
But basically here is how the form works.
the html file sets the fields and the form namethen the php file you have
$form = new Form('formname');
then in the php file you set the fields to what you want
example: you can call it whatever you want, such as $MyFormData
$MyFormData = new TextField('fieldname');
$MyFormData->setLabel($language->text('pluginname', 'lang key here'));
$MyFormData->setRequired();
$MyFormData->addAttribute('size','10');
$MyFormData->addAttribute('maxlength','30');
$form->addElement($MyFormData);
then once you have all your fields assigned then you just add the form
$this->addForm($form);
Then when you submit the form it looks for the request that is a post request which is secure (there is post and get) and you also run it through the validator
if( OW::getRequest()->isPost() )
{
if ( $form->isValid($_POST) )
{
then to get the values of the form
$values = $form->getValues();
example of one value would be
$vidtitle = $values['vidtitle']; whatever you called your fieldname
if you want to view the whole array of the form you can do
echo "<pre>";
print_r($values);
exit;
does that help?
OW::getEventManager()->bind(PostService::EVENT_AFTER_ADD, array($this, "onAfterPostAdd"));
OW::getEventManager()->bind(PostService::EVENT_AFTER_EDIT, array($this, "onAfterPostEdit"));
also there is a save event in the blogs controllers save.php file
OW::getEventManager()->trigger(new OW_Event(PostService::EVENT_AFTER_ADD, array(
so you might be able to work that same logic using the postservice into your plugin or find same event in forum
I'm interested in your article that you published on this website, Dehradun Escort Service so please keep sharing insightful facts.