1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Super confused! Adding a search form.

Super confused! Adding a search form.

4 posts, 0 answered
  1. Richard
    Richard avatar
    64 posts
    Registered:
    09 Oct 2012
    10 Jan 2013
    Link to this post

    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!

  2. Georgi Georgiev
    Georgi Georgiev avatar
    10 posts
    Registered:
    27 Apr 2016
    11 Jan 2013
    Link to this post

    Hi Richard,

    I will recommend you to follow these links. A similar problem is discussed there:

    http://www.sitefinity.com/developer-network/forums/developing-with-sitefinity/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
  3. Richard
    Richard avatar
    64 posts
    Registered:
    09 Oct 2012
    14 Jan 2013 in reply to Georgi Georgiev
    Link to this post

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

  4. Victor Velev
    Victor Velev avatar
    1345 posts
    Registered:
    06 Jul 2015
    17 Jan 2013
    Link to this post
    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
4 posts, 0 answered