Gossamer Forum
Home : Products : Links 2.0 : Installation -- Unix :

Select field in link.def

Quote Reply
Select field in link.def
I want to use select field in link.def and i modified the link.def and it is working
from admin i added a link and every thing working fine

but i don't know how to write them in html tag for this and i am using template version of link2.0
Megrisoft
Web Hosting Company
India Software Company
SEO Company


Quote Reply
Re: [megri] Select field in link.def In reply to
Read the following page:

http://info.netmar.com/creating/forms.html


Quote Reply
Re: [RedRum] Select field in link.def In reply to
i have seen your Mode at http://www.wiredon.net/gt/ it is really a wonderfull work you have done and i think earlier you were with gossamer-threads

I have used follwoing tags it works fine

<tr>
<td ><font face="Arial" size="2">Content:</font></td>
<td width=80%>
<select name="Content" size=1>
<option>Clean
<option>Moderate
<option>Filthy
</select>
</td>
</tr>
but when i try to use <%Content%> it gives error message

above is simple html i have been using but it creates difficulty when in adderror.html and modify.html because there in modify html it shows only the value already selected and other options are not shown so when modifying it is difficult to select other options

since you are master of link2

can you tell me where i can get mode for making search on various fields i means i want search form where we can search on various field definded in link.def
Megrisoft
Web Hosting Company
India Software Company
SEO Company


Quote Reply
Re: [megri] Select field in link.def In reply to
Hi,

Yes using the tag like <%Content%> only prints the value.

In order to build a select list you need to add something like this in site_html_templates.pl....


$content = &build_select_field ("Content", "$in{'Content'}");

Then add...

content_list => $content

into the appropriate subs in site_html_templatea.pl so the script recognises the <%content_list%> tag.

For example...
Code:
sub site_html_modify_form {
# --------------------------------------------------------
# This routine determines how the modify form page will look like.

my $category = &build_select_field ("Category", "$in{'Category'}");
my $content = &build_select_field ("Content", "$in{'Content'}");

&html_print_headers;
print &load_template ('modify.html', {
Category => $category,
content_list => $content,
%globals
});
}