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.
Custom form entry for discussions
Hey there, I just started using Vanilla, and I've been really happy with how easy it is to customize most of the settings, but I'd really like to alter the form entry for posting comments and discussions. Can anyone point me in the right direction? Ideally I'd like the comment entry be subdivided into several different named fields.
thanks!
0
This discussion has been closed.
Comments
i've edited the comment_form.php file to display two textarea elements, here's the code:
<label for="CommentBox"> <a href="./" id="CommentBoxController" onclick="' ."ToggleCommentBox('".$this->Context->Configuration['WEB_ROOT']."ajax/switch.php', '".$this->Context->GetDefinition('SmallInput')."', '".$this->Context->GetDefinition('BigInput')."', '". $this->Context->Session->GetVariable('SessionPostBackKey', 'string')."'); return false;".'">'.$this->Context->GetDefinition($this->Context->Session->User->Preference('ShowLargeCommentBox')?'SmallInput':'BigInput').'</a>'; $this->CallDelegate('CommentForm_PostCommentToggle'); echo $this->Context->GetDefinition('EnterYourComments').' </label> <textarea name="Body" class="' .($this->Context->Session->User->Preference('ShowLargeCommentBox') ? 'LargeCommentBox' : 'SmallCommentBox') .'" id="CommentBox" rows="10" cols="85"'.$this->CommentFormAttributes.'>' .$Comment->Body .'</textarea> <label for="CommentBox"> <a href="./" id="CommentBoxController" onclick="' ."ToggleCommentBox('".$this->Context->Configuration['WEB_ROOT']."ajax/switch.php', '".$this->Context->GetDefinition('SmallInput')."', '".$this->Context->GetDefinition('BigInput')."', '". $this->Context->Session->GetVariable('SessionPostBackKey', 'string')."'); return false;".'">'.$this->Context->GetDefinition($this->Context->Session->User->Preference('ShowLargeCommentBox')?'SmallInput':'BigInput').'</a>'; $this->CallDelegate('CommentForm_PostCommentToggle'); echo $this->Context->GetDefinition('EnterYourComments').' </label> <textarea name="Body" class="' .($this->Context->Session->User->Preference('ShowLargeCommentBox') ? 'LargeCommentBox' : 'SmallCommentBox') .'" id="CommentBox" rows="10" cols="85"'.$this->CommentFormAttributes.'>' .$Comment->Body .'</textarea>
This creates two labeled textareas for the comment entry form. I can add variables to language.php to name the fields, but when I hit submit, only the text in the last textarea is submitted. How can I get all textarea's content to be submitted at once?
thanks,
Matt