Like SystemiConnectFri 15 Oct 2021, 04:50
Auto Save MessagesLGforumFri 26 Feb 2021, 13:31
New tutorial questionTheCrowMon 15 Feb 2021, 08:12
Support iOS Emojis (and other platforms)LGforumSun 14 Feb 2021, 01:25
LGforum (2806)
form posts into different topics depending on input Vote_lcapform posts into different topics depending on input Voting_barform posts into different topics depending on input Vote_rcap 
Mr.Easybb (1587)
form posts into different topics depending on input Vote_lcapform posts into different topics depending on input Voting_barform posts into different topics depending on input Vote_rcap 
Bloodbath (745)
form posts into different topics depending on input Vote_lcapform posts into different topics depending on input Voting_barform posts into different topics depending on input Vote_rcap 
Rukiafan (533)
form posts into different topics depending on input Vote_lcapform posts into different topics depending on input Voting_barform posts into different topics depending on input Vote_rcap 
Dom (513)
form posts into different topics depending on input Vote_lcapform posts into different topics depending on input Voting_barform posts into different topics depending on input Vote_rcap 
puppycheese (446)
form posts into different topics depending on input Vote_lcapform posts into different topics depending on input Voting_barform posts into different topics depending on input Vote_rcap 
pedro (330)
form posts into different topics depending on input Vote_lcapform posts into different topics depending on input Voting_barform posts into different topics depending on input Vote_rcap 
Neymar (301)
form posts into different topics depending on input Vote_lcapform posts into different topics depending on input Voting_barform posts into different topics depending on input Vote_rcap 
Hitsu (281)
form posts into different topics depending on input Vote_lcapform posts into different topics depending on input Voting_barform posts into different topics depending on input Vote_rcap 
Flora (275)
form posts into different topics depending on input Vote_lcapform posts into different topics depending on input Voting_barform posts into different topics depending on input Vote_rcap 


form posts into different topics depending on input

pandaliciouspandalicious
Status : No status yet...

Posts : 14
Join date : 2013-10-31
Fri 13 Mar 2015, 18:45
Hey guys!
I generated a form using this site (http://solkis.comuf.com/projetos/gerador/v2/) but i could go with a simple code as well, since in this case there's no fancy date picking or anything needed.

The form includes a dropdown, and depending on the chosen option the form should post into different topics. So let's say the user chooses option 1 > posts into topic id 1, the user chooses option 2 > it posts into topic id 2 etc.
Can anyone help me with that, please?
Ange TuteurAnge Tuteur
Status : No status yet...

Posts : 109
Join date : 2014-02-18
Age : 28
Location : North America
Sat 14 Mar 2015, 00:52
Hey,

It's possible. You just have to setup a few of the form elements, such as :

1. Message content
2. Topic ID
3. Mode

These three fields are required for making a reply to a topic. However, you need to ensure that the following option is disabled :
General > Security > Disallow unoffical forms to post on the forum : NO

Here's an example form :
Modules > HTML pages management > Create a new page

Use your forum header and footer : yes
Code:
[panda=html]<div class="module">
  <div class="inner">
    <span class="corners-top"><span></span></span>
    <div class="h3">Example</div>
   
    <form name="post" method="post" action="/post">
      <fieldset>
       
        <dl>
          <dt><label>Select a topic : </label></dt>
          <dd>
            <!--
              TOPIC ID
              For forums change name="t" to name="f"
              The value of the options determines where the your message ends up
            -->
            <select name="t">
              <option value="1">1st topic</option>
              <option value="2">2nd topic</option>
              <option value="3">3rd topic</option>
            </select>
          </dd>
        </dl>
       
        <dl>
          <dt><label for="text_editor">Message : </label></dt>
         
          <!--
            MESSAGE CONTENT
            The message is required for making replies.
            For new topics you'll need to also include the subject.
          -->
          <dd><textarea id="text_editor" name="message"></textarea></dd>
        </dl>
       
      </fieldset>
     
      <!--
        POST MODE
        reply = reply to topic
        newtopic = create a new topic
      -->
      <input type="hidden" name="mode" value="reply"/>
     
      <div style="text-align:center;"><input type="submit" name="post" value="Submit"/></div>
    </form>
   
    <span class="corners-bottom"><span></span></span>
  </div>
</div>

I have a few comments in there for explanation, but if you have any questions feel free.
pandaliciouspandalicious
Status : No status yet...

Posts : 14
Join date : 2013-10-31
Sat 14 Mar 2015, 10:38
wow Very Happy I didn't thought it would be THAT easy. I was missing the name="t" bit, with that I can set the rest up quite easily. thanks very much (;
Taha HusseinTaha Hussein
Status : www.battash.com

Posts : 188
Join date : 2012-10-11
Age : 41
Location : www.battash.com
Sun 12 Apr 2015, 09:46
could you please give me the full code?
thank you for your usual supports
Sponsored content