Home arrow Forum

Remository Forum

 


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
  | | Sorry, you do not currently have permission to write here.
admin

Karma: 101  
Re:Customising Fields - Drop down lists - 2005/12/14 23:22 Have a look at the admin side HTML generation - there is a Mambo function for creating an option that is used a lot in the config section of the Remository code, and another function (forget the names) that takes an array of options and creates a complete list. You can then adapt the standard Remository routines to generate an item that has a legend to the left and the option select list to the right. Martin Brampton aka Counterpoint
http://aliro.org
http://black-sheep-research.com
  | | Sorry, you do not currently have permission to write here.

Save FM Radio

Login

Subscribe to Premium Support

Get priority support for Remository and Glossary, sign up now for a Premium Support monthly subscription:

Your Remository user name

Or purchase a year's support:

Your Remository user name

Recommended SEF

SEF Advance

Who is Online

Remository welcomes guests and visitors

We have 5 guest online