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

News:

CPG Release 1.6.28
added submissions from {406man}
cleaned up a few PHP (8.4) deprecations
fixed PHP deprecation in calendar
removed security vulnerability
(please upgrade when possible)

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">