how to create inputs in new topic form page ?
3 posters
Page 1 of 1
how to create inputs in new topic form page ?
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 eveningi 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>
Re: how to create inputs in new topic form page ?
Yesterday at 4:44 pm
Today at 1:16 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!
|
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: how to create inputs in new topic form page ?
Hello @bodahassan,
To add new inputs to your form you need to add this code:
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.
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.
Re: how to create inputs in new topic form page ?
Thank you @Luffy but you didn't understand my question
I want the input appear in topic like support forum
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
I want the input appear in topic like support forum
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
Re: how to create inputs in new topic form page ?
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:
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>
Re: how to create inputs in new topic form page ?
Thank you so much @Luffy
I tried to work on the example but it didn't work with me
Content input did not appear in topic
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>
Re: how to create inputs in new topic form page ?
@bodahassan that's because your textarea element has different ID with the one you have on your script.
Try changing the
in your script with this one:
Try changing the
|
|
Re: how to create inputs in new topic form page ?
@luffy I'm sure I've changed the editorID id
see :
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>
Re: how to create inputs in new topic form page ?
Bumps Bumps Bumps Bumps Bumps Bumps Bumps !!!!!!!!!!!!!!
I need quick response please
I need quick response please
Re: how to create inputs in new topic form page ?
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
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
Re: how to create inputs in new topic form page ?
Please don't use bold or color and keep to the default text. This is reserved for the staff for moderation. Thank you.
|
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: how to create inputs in new topic form page ?
@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!
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!
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum