1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Send data from a form in a template back to controller

Discussion in 'XenForo Development Discussions' started by Jarvis, May 15, 2016.

  1. Jarvis

    Jarvis Member

    In my controller i have two functions actionIndex() and my 'action' area - actionSubmit().

    If my form is simply:

    Text area 1 <input type="text" name="area1">
    Text area 2 <input type="text" name="area2">
    <input type="submit">

    How can I send the two text area strings back to the controller when a user presses 'submit'?

    I've read about:

    $text = $this->_input->filterSingle('area1', XenForo_Input::STRING);

    But I'm not sure how to implement it or even if this is what I'm looking for.
  2. Jarvis

    Jarvis Member

  3. Bob

    Bob Well-Known Member

    public function actionPostNote()
  4. Jarvis

    Jarvis Member

    Thanks, I just cracked it a few minutes ago.

    Just posting questions while slamming my head into it until I get there

Share This Page