how to create inputs in new topic form page ? Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.
3 posters

    how to create inputs in new topic form page ?

    bodahassan
    bodahassan
    Forumember


    Posts : 35
    Reputation : 1
    Language : arabic

    In progress how to create inputs in new topic form page ?

    Post by bodahassan August 27th 2016, 11:44 pm

    Technical Details


    Forum version : #phpBB3
    Position : Founder
    Concerned browser(s) : Mozilla Firefox
    Screenshot of problem : https://i.servimg.com/u/f35/13/76/93/58/post_a10.png
    Who the problem concerns : Yourself
    Forum link : http://sd.koutstore.com/h9-page

    Description of problem

    Good evening

    i want to create inputs such as support forum but i don't know how it can be done

    I found a simple HTML page, now I want to add some inputss to appear in the topic such as the exact support forum

    Code:
            <form enctype="multipart/form-data" name="post" method="post" action="/post">
              <div class="panel">
                <fieldset>
                  <dl>
                    <dt><label>Select Forum :</label></dt>
                    <dd>
                      <select name="f">
                        <option value="1">Forum 1</option>
                        <option value="2">Forum 2</option>
                        <option value="3">Forum 3</option>
                      </select>
                    </dd>
                  </dl>
               
                  <dl>
                    <dt><label>Topic title :</label></dt>
                    <dd><input type="text" name="subject" class="inputbox medium"/></dd>
                  </dl>
               
                  <dl>
                    <dt><label>Message :</label></dt>
                    <dd><textarea id="text_editor_textarea" name="message"></textarea></dd>
                  </dl>
               
                  <div style="text-align:center;">
                    <input class="button1" name="post" value="Send" type="submit"/>
                    <input name="mode" value="newtopic" type="hidden"/>
                  </div>
                </fieldset>
              </div>
            </form>

    bodahassan
    bodahassan
    Forumember


    Posts : 35
    Reputation : 1
    Language : arabic

    In progress Re: how to create inputs in new topic form page ?

    Post by bodahassan August 28th 2016, 8:16 pm

    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51549
    Reputation : 3523
    Language : English
    Location : United States

    In progress Re: how to create inputs in new topic form page ?

    Post by SLGray August 28th 2016, 8:17 pm

    Yesterday at 4:44 pm
    Today at 1:16 pm

    Second Reminder:
    Please don't double post. Your posts need to be separated by 24 hours before bumping. Please use the edit button, instead!

    Please read our forum rules:  ESF General Rules



    how to create inputs in new topic form page ? Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    TheCrow
    TheCrow
    Manager
    Manager


    Male Posts : 6916
    Reputation : 795
    Language : Greek, English

    In progress Re: how to create inputs in new topic form page ?

    Post by TheCrow August 28th 2016, 10:13 pm

    Hello @bodahassan,

    To add new inputs to your form you need to add this code:
    Code:
    <dl>
      <dt><label>FIELD NAME HERE :</label></dt>
      <dd><input type="text" name="something" class="inputbox medium"/></dd>
    </dl>

    This will add a new input to your form. You can copy paste any field you want in your form and add it again and again as many times as you want. Smile



    how to create inputs in new topic form page ? Thecro10
    Forum of the Forums

    Forumotion Rules | Tips & Tricks |
    FAQ | Did you forget your password?



    *** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
    No support via PM!
    bodahassan
    bodahassan
    Forumember


    Posts : 35
    Reputation : 1
    Language : arabic

    In progress Re: how to create inputs in new topic form page ?

    Post by bodahassan August 28th 2016, 11:01 pm

    Thank you @Luffy but you didn't understand my question

    I want the input appear in topic like support forum

    how to create inputs in new topic form page ? 22312110

    I think inputs also need to JavaScript code

    Because if you add inputs to the form it will not show up in the topic because it is not within the textarea
    TheCrow
    TheCrow
    Manager
    Manager


    Male Posts : 6916
    Reputation : 795
    Language : Greek, English

    In progress Re: how to create inputs in new topic form page ?

    Post by TheCrow August 28th 2016, 11:21 pm

    Well at first you need to create a form based on what you want the form to have in.
    Afterwards you need to add each input and each part of that form some specific and different ID's so that with the javascript code it will grab them, add them to the editor and automatically post it like here. A small example of what i am saying is this one:

    Code:
    <form id="pm-form">
      <fieldset style="border:none;">    </fieldset>               
      <div class="input1">
        <div class="inputTitle">
        Field 1:
        </div>
        <input id="input1" type="text" />                                     
      </div>   
     
      <input id="topicTitle" type="text" name="subject" value="Topic Title" style="display:none;" /> 
      <textarea id="editorID" name="message" style="display:none;"></textarea>                                 
    </form>
    <div style="border: none;">                             
      <input type="submit" name="post" id="sendButton" value="Submit" />                   
    </div>

    <script>
                document.getElementById('sendButton').onclick = function() {
                  // define your variables !
                  var message = document.getElementById('editorID'),
                      input1 = document.getElementById('input1');
     
                  // generate error mesage for each required field
                  if (!input1.value) err += 'Please complete all fields.';
           
                  if (err) {
                    alert(err); // return error message
                    return false; // stop event propagation
                  }
               
                  message.value = 'This is the input value:' + input1.value;
           
                };
                </script>
                </div>



    how to create inputs in new topic form page ? Thecro10
    Forum of the Forums

    Forumotion Rules | Tips & Tricks |
    FAQ | Did you forget your password?



    *** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
    No support via PM!
    bodahassan
    bodahassan
    Forumember


    Posts : 35
    Reputation : 1
    Language : arabic

    In progress Re: how to create inputs in new topic form page ?

    Post by bodahassan August 28th 2016, 11:45 pm

    Thank you so much @Luffy how to create inputs in new topic form page ? 1f490
    I tried to work on the example but it didn't work with me
    Content input did not appear in topic

    Code:
                      <form enctype="multipart/form-data" name="post" method="post" action="/post">
                      <div class="panel">
                        <fieldset>
                          <dl>
                            <dt><label>Select Forum :</label></dt>
                            <dd>
                              <select name="f">
                                <option value="1">Forum 1</option>
                                <option value="2">Forum 2</option>
                                <option value="3">Forum 3</option>
                              </select>
                            </dd>
                          </dl>

                          <dl>
                            <dt><label>Topic title :</label></dt>
                            <dd><input type="text" name="subject" class="inputbox medium"/></dd>
                          </dl>
                              <div class="input1">
                <input id="input1" type="text" />                                   
            </div>
                          <dl>
                            <dt><label>Message :</label></dt>
                            <dd><textarea id="text_editor_textarea" name="message"></textarea></dd>
                          </dl>
                     
                          <div style="text-align:center;">
                <input type="submit" name="post" id="sendButton" value="Submit" />                 
                            <input name="mode" value="newtopic" type="hidden"/>
                          </div>
                        </fieldset>
                      </div>
                    </form>
     
           
               
        <script>
            document.getElementById('sendButton').onclick = function() {
              // define your variables !
              var message = document.getElementById('text_editor_textarea'),
                  input1 = document.getElementById('input1');

              // generate error mesage for each required field
              if (!input1.value) err += 'Please complete all fields.';

              if (err) {
                alert(err); // return error message
                return false; // stop event propagation
              }

              message.value = 'This is the input value:' + input1.value;

            };
        </script>
    TheCrow
    TheCrow
    Manager
    Manager


    Male Posts : 6916
    Reputation : 795
    Language : Greek, English

    In progress Re: how to create inputs in new topic form page ?

    Post by TheCrow August 28th 2016, 11:48 pm

    @bodahassan that's because your textarea element has different ID with the one you have on your script.

    Try changing the
    Code:
    editorID
    in your script with this one:
    Code:
    text_editor_textarea



    how to create inputs in new topic form page ? Thecro10
    Forum of the Forums

    Forumotion Rules | Tips & Tricks |
    FAQ | Did you forget your password?



    *** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
    No support via PM!
    bodahassan
    bodahassan
    Forumember


    Posts : 35
    Reputation : 1
    Language : arabic

    In progress Re: how to create inputs in new topic form page ?

    Post by bodahassan August 28th 2016, 11:54 pm

    @luffy I'm sure I've changed the editorID id

    see :
    Code:
                              <form enctype="multipart/form-data" name="post" method="post" action="/post">
                              <div class="panel">
                                <fieldset>
                                  <dl>
                                    <dt><label>Select Forum :</label></dt>
                                    <dd>
                                      <select name="f">
                                        <option value="1">Forum 1</option>
                                        <option value="2">Forum 2</option>
                                        <option value="3">Forum 3</option>
                                      </select>
                                    </dd>
                                  </dl>
           
                                  <dl>
                                    <dt><label>Topic title :</label></dt>
                                    <dd><input type="text" name="subject" class="inputbox medium"/></dd>
                                  </dl>
                                      <div class="input1">
                        <input id="input1" type="text" />                                 
                    </div>
                                  <dl>
                                    <dt><label>Message :</label></dt>
                                    <dd><textarea id="text_editor_textarea" name="message"></textarea></dd>
                                  </dl>
                           
                                  <div style="text-align:center;">
                        <input type="submit" name="post" id="sendButton" value="Submit" />               
                                    <input name="mode" value="newtopic" type="hidden"/>
                                  </div>
                                </fieldset>
                              </div>
                            </form>
           
                 
                     
                <script>
                    document.getElementById('sendButton').onclick = function() {
                      // define your variables !
                      var message = document.getElementById('text_editor_textarea'),
                          input1 = document.getElementById('input1');
           
                      // generate error mesage for each required field
                      if (!input1.value) err += 'Please complete all fields.';
           
                      if (err) {
                        alert(err); // return error message
                        return false; // stop event propagation
                      }
           
                      message.value = 'This is the input value:' + input1.value;
           
                    };
                </script>
    bodahassan
    bodahassan
    Forumember


    Posts : 35
    Reputation : 1
    Language : arabic

    In progress Re: how to create inputs in new topic form page ?

    Post by bodahassan August 30th 2016, 9:22 pm

    Bumps !!! Think

    @Ange Tuteur Please help me to solve the problem, It's very important to me how to create inputs in new topic form page ? 1f623
    bodahassan
    bodahassan
    Forumember


    Posts : 35
    Reputation : 1
    Language : arabic

    In progress Re: how to create inputs in new topic form page ?

    Post by bodahassan September 1st 2016, 11:24 pm

    Bumps Bumps Bumps Bumps Bumps Bumps Bumps !!!!!!!!!!!!!!

    I need quick response please
    bodahassan
    bodahassan
    Forumember


    Posts : 35
    Reputation : 1
    Language : arabic

    In progress Re: how to create inputs in new topic form page ?

    Post by bodahassan September 4th 2016, 12:29 am

    Where the support team, what all this carelessness !!!!!!!!!!!!!!!!

    5 days and did not solve the problem

    And if the support team is not qualified to answer queries and issues of Members why if they are within the staff
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51549
    Reputation : 3523
    Language : English
    Location : United States

    In progress Re: how to create inputs in new topic form page ?

    Post by SLGray September 4th 2016, 4:10 am

    Please don't use bold or color and keep to the default text. This is reserved for the staff for moderation.  Thank you.
    Please read our forum rules:  ESF General Rules



    how to create inputs in new topic form page ? Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    TheCrow
    TheCrow
    Manager
    Manager


    Male Posts : 6916
    Reputation : 795
    Language : Greek, English

    In progress Re: how to create inputs in new topic form page ?

    Post by TheCrow September 4th 2016, 3:30 pm

    @bodahassan staff members are volunteers. They are not forced to be here. They volunteer to help as much as they can. Some are not so good at coding. Some are. But firstly they are all human and they have problems and needs in their real lives. We cannot force them to come here and help everytime someone has a problem. We are here to help when we can and where we can. So please be patient and your problem will be solved sooner or later.

    Now, have you checked that the security feature that will allow you to post is turned off?
    To check that go to: Admin Panel > General > Forum > Security > Unauthorize unofficial forms to post messages and private messages on the forum : (set to) No

    Thanks! :rose:



    how to create inputs in new topic form page ? Thecro10
    Forum of the Forums

    Forumotion Rules | Tips & Tricks |
    FAQ | Did you forget your password?



    *** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
    No support via PM!