Super confused! Adding a search form.

Posted by Community Admin on 04-Aug-2018 16:53

Super confused! Adding a search form.

All Replies

Posted by Community Admin on 10-Jan-2013 00:00

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!

Posted by Community Admin on 11-Jan-2013 00:00

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

Georgi Georgiev
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 14-Jan-2013 00:00

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'?

Posted by Community Admin on 17-Jan-2013 00:00

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:


However, if you are creating a search box to search the Sitefinity content, I would suggest to go for the default search functionality and extend the searchbox control in order to achieve the desired result.

Kind regards,
Victor Velev
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed