Gossamer Forum
Home : Products : DBMan SQL : Discussion :

marking required fields in add_form.html

Quote Reply
marking required fields in add_form.html
Hi,

Does someone know if there is a way to mark the required fields in the add record form in any way (like adding a star of changing the text color or the text weight)?

I made the following hack in GT::SQL::Display::HTML::Table::_display()
Code:
# Set the form name (using increment for multiple if requested) and also the display name.
my $field_name = $self->{multiple} ? "$self->{multiple}-$col" : $col;
my $display_name = (exists $self->{cols}->{$col}->{form_display} and length $self->{cols}->{$col}->{form_display})
? $self->{cols}->{$col}->{form_display} : $col;

$self->{cols}->{$col}->{not_null} and $self->mode() eq 'add_form' and $display_name = "<B>$display_name</B>";
my $value = $values->{$col};
my $disp = $self->{disp_form} ? $self->_get_form_display ($col) : $self->_get_html_display ($col);
But I would prefer not to change the code myself....

Thanks, Jasper

http://www.bookings.org
Subject Author Views Date
Thread marking required fields in add_form.html jaspercram 2856 Dec 13, 2002, 5:41 AM
Post Re: [jaspercram] marking required fields in add_form.html
jaspercram 2707 Dec 25, 2002, 3:11 AM