Super confused! Adding a search form.
Unfortunately I'm new to Sitefinity as well as to ASP.NET, so I can't figure out how to add the following form to a page.
<
form
name
=
"searchform"
method
=
"post"
action
=
"http://168.180.199.11/uhtbin/cgisirsi.exe/x/x/0/123"
>
<
label
for
=
"searchdata1"
>
<
span
style
=
"display:none;"
>Search</
span
>
<
input
type
=
"text"
name
=
"searchdata1"
id
=
"searchdata1"
maxlength
=
"255"
size
=
"30"
style
=
"width: 300px;"
value
=
""
/>
</
label
>
<
label
for
=
"srchfield1"
>
<
select
name
=
"srchfield1"
id
=
"srchfield1"
>
<
option
value
=
"TI^TITLE^SERIES^Title Processing^Title"
selected
=
"selected"
>Title</
option
>
<
option
value
=
"AU^AUTHOR^AUTHORS^Author Processing^Actor/Director"
>Actor/Director</
option
>
<
option
value
=
"SU^SUBJECT^SUBJECTS^^Subject"
>Subject</
option
>
<
option
value
=
"GENERAL^SUBJECT^GENERAL^^Word or phrase"
>Word or phrase</
option
>
</
select
></
label
>
<
input
type
=
"submit"
value
=
"Search"
class
=
"button"
/>
<
input
type
=
"hidden"
name
=
"pubyear"
value
=
""
>
<
input
type
=
"hidden"
name
=
"language"
value
=
"ANY"
/>
<
input
type
=
"hidden"
name
=
"format"
value
=
"DVD"
/>
<
input
type
=
"hidden"
name
=
"item_type"
value
=
"ANY"
/>
<
input
type
=
"hidden"
name
=
"location"
value
=
"ALL"
/>
<
input
type
=
"hidden"
name
=
"item_1cat"
value
=
"ANY"
/>
<
input
type
=
"hidden"
name
=
"item_2cat"
value
=
"ANY"
/>
<
input
type
=
"hidden"
name
=
"shadow"
value
=
"NO"
/>
<
input
type
=
"hidden"
name
=
"sort_by"
value
=
"ANY"
/>
<
input
type
=
"hidden"
name
=
"relevance"
value
=
"off"
>
</
form
>
It doesn't 'POST' to our Sitefinity site but to a different site entirely. I tried just copying and pasting the form in a content block widget through the CMS but that doesn't work. I also tried using the form module but I don't see how to add hidden fields or how to POST to the URL in the Action. This may be simple but at the moment it just doesn't make sense to me.
Thanks for your help!
Hi Richard,
I will recommend you to follow these links. A similar problem is discussed there:
www.sitefinity.com/.../using-html-editor-to-create-a-form
Also you can take a look to this:
http://www.sitefinity.com/developer-network/forums/designing-with-sitefinity/work-with-html-forms-code
Thanks for the links, unfortunately they don't help me much more than telling me that I can't have multiple forms on a page in Sitefinity since the entire page is in essence one big form...the only link to a 'solution' was on the second link with a page reference to a Microsoft page for ASP.NET 2.0 from 2005 (8 years ago). Will you guys be able to help me if I submit a formal 'Support Ticket'?
Hi Richard,
In order to achieve your scenario, I would suggest to go ahead and create custom user controls, in which you can implement your functionality. Also, I have found several other articles, which can help you to achieve the desired functionality: