Gossamer Forum
Home : Products : DBMan SQL : Discussion :

hidden form type isse

Quote Reply
hidden form type isse
in the 'Help' documentation of DBSQL, it states that the Form Type "Hidden" is a column that "will be hidden on the add and modify forms" (which i also took to imply that this column would still appear on search forms)

however, i'm finding that Hidden fields are not appearing on the (public and admin) search forms...

does anyone know how i can make Hidden fields appear on search forms while still using the <%Dbsql::HTML::generate_search_form%> in the search template (ie. avoiding building my own templates)?.... i've searched the forum and tried some code tweeking without success

thanks
Quote Reply
Re: [amessaros] hidden form type isse In reply to
I would really appreciate some insight on the aforementioned question, namely "Why do 'Hidden' column types not appear on the public and admin search forms when using the default <%Dbsql::HTML::generate_search_form%> in the search template?"

Maybe Alex can answer whether this is a bug, or just that the DBManSQL Help Documentation needs updating to include search form exclusion? It seems to me that such columns *should* be appearing as default on public/admin search forms.

Thanks
Quote Reply
Re: [xfizz] hidden form type isse In reply to
Hi,

You can follow the steps below to fix it out:

1. Create show_hidden_fields subroutine in Global template:
sub {
my $tags = shift;
my $cols = $tags->{home}->{disp}->{db}->{schema}->{cols};
foreach my $key (keys % $cols) {
$cols->{$key}->{'form_type'} = 'TEXT' if (uc($cols->{$key}->{'form_type'}) eq 'HIDDEN');
}
}

2. Modify your search_form.html like:
.....
<%show_hidden_fields%>
<%Dbsql::HTML::generate_search_form%>
</table>
...

Hope that helps,

TheStone.

B.