Home : Products : DBMan SQL : Discussion :

Products: DBMan SQL: Discussion: Re: [TheStone] How to create select field?: Edit Log

Here is the list of edits for this post
Re: [TheStone] How to create select field?
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

Edit Log: