General Community > Scripting Help

more input in the Post form question

(1/4) > >>

Anguz:
in Post, there's this line to input the $subject:

--- Code: ---<font size="2"><input type="text" name="subject" value="' . addcslashes($form_subject, '"') . '" size="40" maxlength="80" /></font>
--- End code ---

if I want to add an extra input with another name, should I also change the variable inside addslashes() to match the name?

[Unknown]:
Only if you want it prefilled...

-[Unknown]

Anguz:
ah! I understand now!  ;D

thx :)

would it be too much to ask you the code for the extra fields in the post form for the Other Help forum in yabbse.org? that's pretty close to what I'm trying to do  ;)

Spaceman-Spiff:
to add a field, you'll need to adda column in the message table
also some validation in Post2()
what exactly do you want to add?
check my 'now listening to' mod, and modify that for your need

Anguz:
thanks Spaceman-Spiff :)

I checked your mod but it isn't really what I'm trying to do, I don't want to save the extra info separately in the db

the thing is I have a board in my forum to post articles taken from other webpages related to the artists that forums are dedicated to

since they are posted in an order different than the one they were published in and I also don't want them to change their order due to replies, I changed that board to be ordered by subject

to make it work I have to have subjects start with the publishing date at least, but I also want to have the source of the article and the article's title, like this:

yy-mm-dd source "title"

I've asked my members several times, but they just don't follow this... so I want to have extra fields in Post.php so that they HAVE to input that data (like in the Other Help board in yabbse.org) and have a javascript make them add this information before submitting

so I have three dropdown menus for the date (year, month, day) and a text field for the article source, right before the normal subject field

then in Post2 I need to add the extra fields at the beginning of the subject, before saving it to the db and just save it normally and that's it

I more or less have worked out most of it, at least the form part... now I will check how you did the JsValidate mod and try to use it with those fields and then format the subject in Post2

if I run into trouble, I'll post here  :)

thank you guys for your help!

Navigation

[0] Message Index

[#] Next page

Go to full version