![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Aug 2005
Posts: 32
|
HTML / PHP Help
I have a form here is the nuts off it.
<tr><td>Date:</td><td><input type="text" name="date" size="8" value="{date}"> [<a href="javascript:void(0)" onclick="document.f1.date.value='{now}'">set to now</a>]</td></tr> <tr><td>Category:</td><td><select name="category">{category_choices}</select></td></tr> <tr><td>SubCategory:</td><td><select name="subcategory[]" multiple="multiple" size="25" style="height: 100%;">{subcategory_choices}</select></td></tr> <tr><td>Filename:</td><td><input type="text" name="filename" size="40" value="{filename}"></td></tr> <tr><td>Title:</td><td><input type="text" name="title" size="40" value="{title}"></td></tr> <tr><td>Description:</td><td><textarea name="description" cols="60" rows="4">{description}</textarea></td></tr> <tr><td>Keywords:</td><td><input type="text" name="keywords" size="40" value="{keywords}"></td></tr> <tr><td>Model:</td><td><input type="text" name="custom1" size="40" value="{custom1}"></td></tr> <tr><td>Paysite:</td><td><input type="text" name="custom2" size="40" value="{custom2}"></td></tr> PHP is pulling some of the data from MySQL... I want to make it so that I can enter text AND / OR pre-select some keywords that I build.... in the following inputs Title, Keywords, Model and, Paysite For example I would go into the form and "Paysite" would have a drop down with Site1, Site2, Site3 and Site4.... or Keywords I could input text or have a dropdown with pre-defined keyword sets "key1, key2, key3 ...", but I could also take away or add if needed via text.... is it possible? I'm pulling all this from Video Manager, by wojfun (I cannot post URLs)... for CCBill (this is the script I'm using trying to modify). Any thoughts, thanks in advance!!!! ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
80/20 Rule
Industry Role:
Join Date: Apr 2010
Location: Los Angeles
Posts: 3,051
|
<table>, <tr> and <td> tags are all deprecated. I would suggest using a different form.
__________________
Support American Heroes | How Bad is My Batch? | Vaccine Deaths & Adverse Reactions | Free Speech Coalition | <WARNING> ePayService / Guerra Capital, INC / MTACC payments | Flirt4Free Fucks their Affiliates | Don't do business with piece of shit Andy Alvarez from Webmaster Central / VR3000, who said: "If it was up to me, they would have shot all 30,000 of those country loving shitheads" |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Industry Role:
Join Date: Sep 2001
Location: North America
Posts: 2,016
|
![]()
__________________
"There he goes. One of God's own prototypes. A high-powered mutant of some kind never even considered for mass production. Too weird to live, and too rare to die." -Hunter S. Thompson |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
So Fucking Banned
Industry Role:
Join Date: Jun 2011
Location: the land of woke sleuths
Posts: 16,493
|
I would one off it
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Industry Role:
Join Date: Apr 2019
Posts: 657
|
As usual I'm not sure what's being asking for, but do you mean autocomplete, like this?
https://codepen.io/adaptabiz/pen/WNoRjVd
__________________
__________________ |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Join Date: Feb 2009
Posts: 201
|
Just my
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 | |
Confirmed User
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana. / Newcastle, England.
Posts: 1,116
|
Is this what you are looking for?
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Confirmed User
Industry Role:
Join Date: Jul 2021
Posts: 185
|
Yup. That code looks like a god damn mess.
__________________
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,053
|
I usually accomplish what you are describing by using a select (dropdown list) and a text field next to each other so that the user can pick from the dropdown or enter a new value.
I think that is what you are describing. Something like this: <b>Select Name:</b> <select name="name_select"> <option></option> <option>name1</option> <option>name2</option> </select> - OR - <b>Enter name:</b><input type=text name=name2use id=name2use value="" size=50 maxlength=254> I also use some javascript tricks so that if they do the select then the text field is disabled and vice versa. .
__________________
All cookies cleared! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 | |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,053
|
Quote:
Check the html spec if you don't believe me. They should not be used for layout but they are still perfectly valid html and should be used for data tables. Html 4.01 spec https://www.w3.org/TR/html401/struct/tables.html Html 5 spec https://dev.w3.org/html5/spec-LC/tab...-table-element .
__________________
All cookies cleared! |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 | |
(>^_^)b
Industry Role:
Join Date: Dec 2011
Posts: 7,224
|
Quote:
I might be wrong, but even though table isn't depreciated, aren't a lot of the table attributes depreciated? Tables aren't the best for performance, though.
__________________
![]() I've referred over $1.7mil in spending this past year, you should join in. ![]() ![]() I make a lot more money in the medical field in a lab now, fuck you guys. Don't ask me to come back, but do join Chaturbate in my sig, it still makes bank without me touching shit for years.. ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 |
Confirmed User
Join Date: Aug 2005
Posts: 32
|
I know the code looks like a mess, and it's dated. I just don't really want to go through the trouble of rebuilding from the ground up, if I don't have to.
I'm going to try a couple of the suggestions.... Yes like auto-complete, I think that is what I will attempt to go for on this, it would just make what I'm doing a hell of a lot less work... |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 | |
Confirmed User
Join Date: Aug 2005
Posts: 32
|
Quote:
This is a nice find. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#14 |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,053
|
If what you are looking for is the autocomplete type thing then you are probably wanting a combo box.
The simplest form of that is probably the html5 list attribute: https://www.w3schools.com/tags/tryit...html5_datalist But there are also some jquery options: https://jqueryui.com/autocomplete/ https://www.telerik.com/blogs/how-to...n-your-web-app I am not sure that there are any ready made controls that will let you add an item by typing it into the combobox, most just do the sutocomplete type thing allowing you to search the list by typing something in and finding it in the list. I would think that someone had to come up with one at some poiint though because it really wouldn't be that difficult to figure out (famous last words). .
__________________
All cookies cleared! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#15 |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,053
|
I was just messing with the html5 list code and it does what I think you want.
You can start typing and if it matches something, that something will show up on the list. If it does not match anything you can continue typing and when you hit the submit whatever you typed gets passed in as input. No java script tricks needed. .
__________________
All cookies cleared! |
![]() |
![]() ![]() ![]() ![]() ![]() |