Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Detecting type of form
I want to detect whether a form is DiscussionForm or CommentForm
For that I'm using this check
How do i get $DiscussionForm in there. Using global $DiscussionForm doesn't work
Using
creates a new control and hence the delegates I'm attaching to the DiscussionForm don't work anymore.
For that I'm using this check
if($Context->SelfUrl == 'post.php') {
if ($DiscussionForm->Form){}
}
How do i get $DiscussionForm in there. Using global $DiscussionForm doesn't work
Using
$DiscussionForm = $Context->ObjectFactory->CreateControl($Context, 'DiscussionForm');
creates a new control and hence the delegates I'm attaching to the DiscussionForm don't work anymore.
0
This discussion has been closed.
Comments
its not one of the root php pages. Its a theme file
I would think that DiscusssionForm_PreRender fires on discussion forms, and CommentForm_PreRender fires on comment forms.