Have a value in upload form Have a value in upload form
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

Have a value in upload form

Started by recman, October 10, 2004, 09:33:45 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

recman

Hi!
When I have uploaded a file and should place it in a album I come to the file upload.php, there is a form called "File Title". I wonder how I can do to always have a value in this form, a text that is typed there automaticlly so the user dont have to write it. Anyone understand how I mean? Sorry for the bad english.

Nibbler

Upload.php, find:

// Create a text box.

add

$value = ($name == 'title') ? 'Text that appears here automatically' : '';

just below it

find

<input type="text" style="width: 100%" name="$name" id="$name" maxlength="$max_length" value="" class="textinput">

change to

<input type="text" style="width: 100%" name="$name" id="$name" maxlength="$max_length" value="$value" class="textinput">