Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Validation Customization

Quote Reply
Validation Customization
Is it possible in Links SQL to have a drop down category menu on the validation page instead of the box? (That is how it is in Links 2.0)

-Ali

Quote Reply
Re: Validation Customization In reply to
You're probably aware that you can display categories two different ways;

1 - As a list of all your categories
2 - As the full category name (the non-linked path name) using the category ID

If you've currently got only the category name displayed in a single input 'box' field you'll need to edit your Links.pm file to change it to a 'list' - but you'll find this also changes the 'Add' page to display a list as well !!

In your Links.pm file look for:

Code:
# Set to one to have Links generate a category list, set to 0 to use
# the category id.1
$LINKS{db_gen_category_list} = 0;
Change it to - $LINKS{db_gen_category_list} = 1;


If you already have the categories displayed as a list and you want to reduce the size of the list-box to a single line look in DBSQL.pm for the following:

sub build_select_field for:

Code:
$multiple ? ($multiple = ' MULTIPLE SIZE=3 ') : ($multiple = '');
Try changing MULTIPLE SIZE=3 to MULTIPLE SIZE=1 to see if that has the desired effect (I haven't tried it myself), but be aware that this will probably apply to ALL of your 'Select' type fields, not just the 'category' field and may give you undesirable results!!

All the best
Shaun

Quote Reply
Re: Validation Customization In reply to
Thank you