what to make Format_Select_Field to come it selected the value of the Default field in the form od Add page?
Jan 5, 2011, 1:06 AM
Veteran / Moderator (18436 posts)
Jan 5, 2011, 1:06 AM
Post #2 of 3
Views: 3112
Should be a simple fix. Just find this in /Plugins/ULTRAGlobals.pm
...and then find:
my $field_vals = $schema->{$field};
...add this below it:
$current_value ||= $default;
Untested, but should do the trick
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Code:
sub Format_Select_Field {...and then find:
Code:
my $schema = $DB->table('Links')->cols; my $field_vals = $schema->{$field};
...add this below it:
Code:
my $default = $field_vals->{default}; $current_value ||= $default;
Untested, but should do the trick
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!