SimonFinch
|
Customising Fields - Drop down lists - 2005/12/14 17:50
I want to alter the appearance of the data input forms for some of the fields but am not sure how to do this. The form fields are created on the page by calling a function "fileInputBox"
| Code: | function fileInputBox ($title, $name, $value, $width, $tooltip=null) {
$this->inputTop($title);
?>
<td align="left" valign="top">
<input class="inputbox" type="
text" name="<?php echo $name; ?>" size="<?php echo $width; ?>" value="<?php echo
htmlentities($value); ?>" />
<?php if ($tooltip) echo tooltip($tooltip); ?>
</td>
</tr>
<?php
}
|
This is displayed by using this:
| Code: | $this->fileInputBox(_MY_FIELD_LANGUAGE_INCLUDE,'myfieldname',$file->myfieldname,25);
|
I want to add some drop down options for some fields to limit the input. In normal html, I'd do something like:
| Code: | <form name="MyFormExample" id="MyFormExample" method="post" action="">
<select name="select">
<option value="Option 1">Option 1</option>
<option value="Option 2">Option 2</option>
</select>
</form>
|
How can I do this using the existing fileInputBox function? If not, I'm assuming a custom function can be created to allow input in this manner, but I'm not sure of the code.
Any ideas?
Cheers,
Simon
|