Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Changing Input Of Title of Discussion

edited June 2010 in Vanilla 2.0 - 2.8
Im a bit of an amateur at this time. And I am confused on how i could change the users input from...

"Typing in a title for discussion"

To a set of choices eg,

Title: *user selects favorite color and there age*
Titles Displays as: 20 Year old - Green

ect... probably simple :/ but as i said, iv only just started tinkering with vanilla

Comments

  • Hmmm... I think this is not so simple.

    First you might copy the file
    /applications/vanilla/views/post/discussion.php
    to your Theme-folder (under /yourtheme/views/post/) and then play around with the following lines (literally speaking to replace them with your new code):
    echo $this->Form->Label('Discussion Title', 'Name');
    echo $this->Form->TextBox('Name', array('maxlength' => 100));
    You may use here the Form-Function to add a dropdown-menu for "FavouriteColor" and a text-field (or another dropdown-menu) for the "Age". Then you would need to somehow match those two values together and build the Name-field of it.

    One approach could be to have a hidden input-field named "Name" and just send the two values from your dropdown-menus via JavaScript to the value of the hidden Name-field... Just as an idea.
Sign In or Register to comment.