Gossamer Forum
Home : Products : DBMan : Installation :

Checkboxes aren't showing up

Quote Reply
Checkboxes aren't showing up
I have modified the search form for my financial planners site, to add explanatory text for the search options. The problem is that the checkboxes don't show up on the search form. The words are there, but not the boxes.

Here is the code:
Code:
sub html_view_search {
# ---------------------------------------
# This page is displayed when a user requests to search the database for viewing.
# Note: all searches must use GET method.
#

$page_title= "Search the Database";
&html_page_top;

$submit_button = "Search";
$reset_button = "Reset Form";

# < -- Start page text -- >
print qq|
<TABLE CELLPADDING=3 CELLSPACING=0 BORDER=1
BGCOLOR="#FFFFCC">
<TR><TD VALIGN="TOP"><$font>Location (please specify
<b>ONE OR MORE</b> areas
where you would prefer to meet with an advisor):</font></TD>
<TD VALIGN="TOP"> |;
print
&build_checkbox_field("Location","$rec{'Location'}"); print
qq|</TD></TR>

<TR><TD VALIGN="TOP"><$font>Fee (please specify whether you have a fee structure
preference - select <B>ONLY ONE</B> ):</font></TD>
<TD VALIGN="TOP"> |;
print &build_radio_field("Fee","$rec{'Fee'}"); print qq|</TD></TR>

<TR><TD VALIGN="TOP"><$font>Client Type (Most advisors deal with a wide variety
of clients; however, some have a special interest or expertise in certain types of clients.
If it is important to yo to deal only with someone with a special expertise, please check
<B>ONE OR MORE</B> of the options available. Otherwise, you may <B>SKIP</B> this section.):</font></TD>
<TD VALIGN="TOP"> |;
print &build_checkbox_field("Client_Type","$rec{'Client_Type'}"); print qq|</TD></TR>

<TR><TD VALIGN="TOP"><$font>Minimum Portfolio (Some advisors have minimum investment
amounts; selecting one of these options will allow you to avoid considering an advisor whose minimum
exceeds your portfolio size. You may <B>SELECT ONE</B> or <B>LEAVE IT BLANK</B>.):</font></TD>
<TD VALIGN="TOP"> |;
print &build_radio_field("Minimum","$rec{'Minimum'}"); print qq|</TD></TR>

<TR><TD VALIGN="TOP"><$font>Planner Expertise (All advisors here provide
comprehensive financial planning; however, some advisors also have a special interest or expertise
in ertain areas. If it is important to yo to deal only with someone with a special expertise,
please check <B>ONE OR MORE</B> of the options available.):</font></TD>
<TD VALIGN="TOP"> |;
print &build_checkbox_field("Expertise","$rec{'Expertise'}"); print qq|</TD></TR>
</TABLE>
|;
# < -- End page text -->

print qq|
<form action="$db_script_url" method="GET" name="form1">
<input type=hidden name="db" value="$db_setup">
<input type=hidden name="uid" value="$db_uid">
|;

# &html_record_form();

# &html_search_options;

print qq|
<p><center>
<INPUT TYPE="SUBMIT" NAME="view_records" VALUE="$submit_button">
<INPUT TYPE="RESET" VALUE="$reset_button">
</center></p></form>
|;

&html_footer;
&html_page_bottom;
}

I can't see any problems with it, but I was staring at it for a long time Smile Thanks for your help.

Kim Lewandowski
Quote Reply
Re: Checkboxes aren't showing up In reply to
Hello kiml:

The only thing I can think of is that you did not include the checkbox in the default.cfg file with this variable:

# Checkbox fields. Field name => Checkbox value.
%db_checkbox_fields = ( Popular => 'Yes,No,Maybe' );

. Take the following as an example:

print &build_radio_field("Fee","$rec{'Fee'}");

Maybe Fee was not defined in the default.cfg in %db_checkbox_fields.

Please give this a try and if that does not solve the problem you can contact me.

------------------
-------------------- Gossamer Threads Inc. ----------------------
Sun Djaja Email: sun@gossamer-threads.com
Internet Consultant
http://www.gossamer-threads.com

Quote Reply
Re: Checkboxes aren't showing up In reply to
You must have the checkboxes within the form in order for them to show up.

Move everthing in the "page text" section to after

Code:
print qq|
<form action="$db_script_url" method="GET" name="form1">
<input type=hidden name="db" value="$db_setup">
<input type=hidden name="uid" value="$db_uid">
|;




------------------
JPD





Quote Reply
Re: Checkboxes aren't showing up In reply to
Thanks. BTW, JPDeni, I used your tutorials Friday night to set this up and they were great. It's really a huge help to have some explanation of how the different parts of html.pl work together.

KimL