Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Re: [TheStone] How to create select field?

Quote Reply
Re: [TheStone] How to create select field? In reply to
Would be fine to add this as an option to the config.
In LSQL I solved this using a plugin, but would be the time to have this empty field text configurable in both LSQL and DBMan SQL.
In LSQL this empty field text in represented by '---' by this is ugly.

In GT::SQL::Display::HTML::select it displays in line 291:
Code:
$blank and ($out .= qq~<option value="">---</option>~);

I would change to
Code:
$blank && $blank_text && ($out .= qq~<option value="">$blank_text</option>~);
Of course the 'blank_text' is an input option.

So the select code call would be look like this:
Code:
return $tags->{home}->{disp}->select ( {
name => $col,
values => $values,
value => $selected,
blank => 1,
blank_text => 'Please select a value',
});

Much better if we avoid English hardcoding in core code so we can use language :
Code:
return $tags->{home}->{disp}->select ( {
name => $col,
values => $values,
value => $selected,
blank => 1,
blank_text => ${$app_name . '::language'}->('REQUIRE_CGI'),
});
The $app_name can be acquired by a separate library. I have the base code to identify the currently running app, and get the $app_name. I can send it to you if you want.

Let me know, if you would accept to add this blank_text option to the GT::SQL::Display::HTML module.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...

Last edited by:

webmaster33: May 3, 2005, 4:07 AM
Subject Author Views Date
Thread How to create select field? webmaster33 5019 Apr 29, 2005, 4:17 PM
Thread Re: [webmaster33] How to create select field?
jai 4927 Apr 30, 2005, 3:54 AM
Thread Re: [jai] How to create select field?
webmaster33 4927 Apr 30, 2005, 11:14 AM
Thread Re: [webmaster33] How to create select field?
604 4961 May 2, 2005, 9:28 AM
Post Re: [TheStone] How to create select field?
webmaster33 4922 May 2, 2005, 9:37 AM
Thread Re: [TheStone] How to create select field?
webmaster33 4925 May 2, 2005, 3:49 PM
Thread Re: [webmaster33] How to create select field?
604 4925 May 2, 2005, 3:51 PM
Post Re: [TheStone] How to create select field?
webmaster33 4910 May 3, 2005, 4:04 AM
Post Re: [TheStone] How to create select field?
webmaster33 4890 May 4, 2005, 8:33 PM