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

Automatically submit form on "select" selection?

Discussion in 'XenForo Development Discussions' started by Jaxel, Dec 27, 2013.

  1. Jaxel

    Jaxel Well-Known Member

    I have a very simple form:
    <form action="{xen:link 'reports/mads/edit', $report}" method="post" class="xenForm AutoValidator">
        <select name="mad_status" id="ctrl_status" class="textCtrl autoSize">
            <option value="">({xen:phrase unspecified})</option>
            <option value="allow" {xen:selected "{$report.mad_status} == 'allow'"}>{xen:phrase allow}</option>
            <option value="deny" {xen:selected "{$report.mad_status} == 'deny'"}>{xen:phrase reject}</option>
        <input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
    How would I set it up so that when a selection is made, it automatically submits?
  2. Jeremy

    Jeremy Well-Known Member

    Use jQuery.on().
  3. Jaxel

    Jaxel Well-Known Member

    That works... I was just hoping there was some sort of shorthand class built into XF like "AutoSubmit" or something.

Share This Page