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.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 09-17-2021, 06:33 PM   #1
longsack
Confirmed User
 
longsack's Avatar
 
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!!!!
longsack is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-18-2021, 08:12 AM   #2
InfoGuy
80/20 Rule
 
InfoGuy's Avatar
 
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.
InfoGuy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-18-2021, 09:08 AM   #3
the indigo
Confirmed User
 
the indigo's Avatar
 
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
the indigo is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-18-2021, 09:50 AM   #4
bean-aid
So Fucking Banned
 
Industry Role:
Join Date: Jun 2011
Location: the land of woke sleuths
Posts: 16,493
I would one off it
bean-aid is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-18-2021, 09:55 AM   #5
ZTT
Confirmed User
 
ZTT's Avatar
 
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
__________________
__________________
ZTT is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-18-2021, 09:57 AM   #6
k33n
Confirmed User
 
Join Date: Feb 2009
Posts: 201
Just my , use <form>
k33n is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-18-2021, 10:06 AM   #7
Publisher Bucks
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:
<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></td></tr><form method="post">
<select name="Select1">
<option>Paysite 1</option>
<option>Paysite 2</option>
<option>Paysite 3</option>
</select></form>

Publisher Bucks is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-18-2021, 10:09 AM   #8
hornyasf
Confirmed User
 
Industry Role:
Join Date: Jul 2021
Posts: 185
Quote:
Originally Posted by InfoGuy View Post
<table>, <tr> and <td> tags are all deprecated. I would suggest using a different form.
Yup. That code looks like a god damn mess.
__________________
hornyasf is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-18-2021, 12:07 PM   #9
sarettah
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!
sarettah is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-18-2021, 12:16 PM   #10
sarettah
see you later, I'm gone
 
Industry Role:
Join Date: Oct 2002
Posts: 14,053
Quote:
Originally Posted by InfoGuy View Post
<table>, <tr> and <td> tags are all deprecated. I would suggest using a different form.
No, they aren't.

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!
sarettah is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-18-2021, 12:39 PM   #11
Colmike9
(>^_^)b
 
Colmike9's Avatar
 
Industry Role:
Join Date: Dec 2011
Posts: 7,224
Quote:
Originally Posted by sarettah View Post
No, they aren't.

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

.
Yep. It's not depreciated and more "just use that for tabulated data and other places where it's supposed to be used".
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.
__________________
Join the BEST cam affiliate program on the internet!
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..
Colmike9 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-18-2021, 04:57 PM   #12
longsack
Confirmed User
 
longsack's Avatar
 
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...
longsack is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-18-2021, 04:58 PM   #13
longsack
Confirmed User
 
longsack's Avatar
 
Join Date: Aug 2005
Posts: 32
Quote:
Originally Posted by sarettah View Post
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.

.

This is a nice find.
longsack is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-18-2021, 08:50 PM   #14
sarettah
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!
sarettah is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-18-2021, 09:30 PM   #15
sarettah
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!
sarettah is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks

Tags
keywords, paysite, text, pulling, model, php, form, title, add, advance, sets, keyword, key1, key2, key3, manager, video, pre-defined, wojfun, urls, ccbill, script, modify, post, descriptiondescription
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.