AnonymousInactive
Hi guys,
I’m trying to make an horizontal version of your S&F bar.
I’m using 3 fields but it can be applied to more or less.
What I’ve done so far (I’ve did this css just for this specific S&F form):
.searchandfilter[data-sf-form-id="2545"] > ul > li {
display:inline-block !important;
}
.searchandfilter[data-sf-form-id="2545"] li.sf-field-search {
width: 40%;
padding-right:10px !important;
}
.searchandfilter[data-sf-form-id="2545"] li.sf-field-tag {
width: 40%;
padding-right:10px !important;
}
.searchandfilter[data-sf-form-id="2545"] .chosen-container.chosen-container-multi {
width: 100% !important;
}
.searchandfilter[data-sf-form-id="2545"] li.sf-field-category {
width: 20% !important;
}
.searchandfilter[data-sf-form-id="2545"] select.sf-input-select {
width: 100%;
}
So far so good. I used % in order to fill the full width. I also added the 10px padding-right just to the first 2 elements.
The only issue I’m facing is that the tag field is formatted differently than the other 2 (different border, font size etc).
Also I would like to change this horizontal view for tables and smartphone to bring it back to 1 field per row.
Any advice?
link to my test page: test.degeneration.it
AnonymousInactive
Hello.
Im having trouble styling my search form. I already have the following code working:
.searchandfilter[data-sf-form-id=”6426″] {
background-color: #ffffff;
font-family: Raleway;
width: 220px;
margin-top: 1px;
font-size: 13px;
color: #000000;
padding: 1px;
letter-spacing: 1px;
word-spacing: 1px;
white-space: 2px;
}
but i cant find the way to correct the overlapping between the radio buttons and text line and to style the buttons for submit and reset.
How can i customize the HTML not only CSS?
AnonymousInactive
Hello,
I am using GTranslate plugin and would like SF2 ajax form results to be translated.
I got this from Gtranslate support:
——-
You have this form:
<form action=”http://en.tracers.ru/archive/” method=”post” class=”searchandfilter” data-sf-form-id=”17942″ data-is-rtl=”0″ data-results-url=”http://tracers.ru/archive/” data-ajax-url=”http://tracers.ru/?sfid=17942&sf_action=get_results” data-ajax-form-url=”http://tracers.ru/?sfid=17942&sf_action=get_form” data-use-history-api=”1″ data-template-loaded=”0″ data-lang-code=”” data-ajax=”1″ data-ajax-target=”#search-filter-results-17942″ data-ajax-links-selector=”.pagination a” data-update-ajax-url=”1″ data-only-results-ajax=”1″ data-scroll-to-pos=”0″ data-auto-update=”1″ id=”search-filter-form-17942″ autocomplete=”off”>
You will need to change data-results-url, data-ajax-url, data-ajax-form-url attributes to be relative or to include the language code like in action attribute. This attributes are not standard attributes like action, that’s why they are not getting replaced with appropriate language domain automatically.
Thanks! – See more at: http://gtranslate.net/forum/ajax-filter-resets-language-t4636.html#sthash.jFV69pbs.dpuf
——-
Can you tell me where should I make change in code?
Thank you,
Oleg
AnonymousInactive
I take several tests and i can’t change page on the result page on a different language than a native one. In english (native language), everything goes well, but in french (in my case) i can’t change page. I changed to apache server and everything is ok. But for performance purpose, i need to run my website on Nginx.
I have a Dreamhost VPS server with Nginx 1.4.4 with PHP 5.5
For debug purpose, here is what i have in response when a click on a page in my result page in French :
url : http://wysote.tzclients.com/fr/?sfid=102&sf_action=get_results&sf_paged=2&lang=fr
And the output is the html of my home page.
In english, the output start with this : {“form”:”<form action=\”http:\/\/wysote.tzclients.com\/inventory\/\” method=\”post\” class=\”searchandfilter\” data-sf-form-id=\”97\”
AnonymousInactive
I ended up adding this code to my site instead of using the search and filter pro widget:
<form action=”” method=”post” class=”searchandfilter” data-sf-form-id=”34373″ data-use-history-api=”1″ data-template-loaded=”0″ data-lang-code=”” data-results-url=”http://focenter.staging.wpengine.com/search-results/” data-display-results=”archive” data-auto-update=”1″ id=”search-filter-form-34373″>
<li class=”sf-field-search” data-sf-field-name=”search” data-sf-field-type=”search” data-sf-field-input-type=””><input isp_ignore type=”text” name=”_sf_search” placeholder=”type and hit enter…” value=””><input type=”hidden” name=”_sf_submitted” value=”1″ /><input type=”hidden” name=”_sf_form_id” value=”34373″ class=”sf_form_id” />
</form>
Above I added the isp ignore attribute and it seems to have removed the autocomplete feature from the instant product search which shouldn’t have been showing up anyway. Now the issue is that when I submit the search, I am still seeing products when I should only be seeing posts and pages according to how that search and filter form was setup.
Am I doing this correctly? And how do I make sure the results show up correctly and don’t pull results from the other search box?
Hey Luis
You can target a search form using the ID already:
.searchandfilter[data-sf-form-id=123] input[type=text]
{
border:1px solid #f00;
}
Thanks
AnonymousInactive
Hi,
I’m trying to validate my website on http://validator.w3.org/ and giving me the following error:
Bad value for attribute action on element form: Must be non-empty.
This is the code that’s causing the problem:
<form action="" method="post" class="searchandfilter" data-sf-form-id="1272" ... >
Thanks for any help.
Hi Ben
You should be able to target the form like:
.searchandfilter[data-sf-form-id='12']
{
/* rules */
}
You should add this to your themes CSS file, not into the CSS loaded by the plugin.
If you don’t see changes, it may be that the plugin CSS is getting loaded after your theme CSS – in that case you could try adding !important to your css rules.
Thanks
Hey Boaz
There are two ways to do it…
Normally your homepage would have a class on it – .home
So you could style Search forms on your homepage like:
.home .searchandfilter
{
border:1px solid #f00;
}
Alternatively you could target them individually using attributes:
.searchandfilter[data-sf-form-id='12']
{
border:1px solid #f00;
}
Where 12 is the ID of your form
I will be adding a proper ID attribute to the forms in the next release.
Thanks
AnonymousInactive
That is what is happening, yes. I’d love to share, but my WP community beat me up for a year and got me to dev locally now. So here is the generated code. (http://imgur.com/XQr8CTs)
<section id="search_filter_register_widget-2" class="widget widget_search_filter_register_widget"><div class="widget-wrap"><form action="" method="post" class="searchandfilter" data-sf-form-id="1267" data-use-history-api="1" data-template-loaded="0"><ul><li class="sf-field-taxonomy-types" data-sf-field-name="_sft_types"><select name="_sft_types[]" class="postform"><option class='level-0 sf-item-0' value='0'> All Types</option> <option class="level-0 sf-item-39" value='39' data-sf-cr='_sft_39' data-sf-hide-empty='1'>Fishing Guide (11)</option>
<option class="level-0 sf-item-38" value='38' data-sf-cr='_sft_38' data-sf-hide-empty='1'>Hunting Guide (4)</option>
</select></li><li class="sf-field-taxonomy-location" data-sf-field-name="_sft_location"><select name="_sft_location[]" class="postform"><option class='level-0 sf-item-0' value='0'> All Locations</option> <option class="level-0 sf-item-42" value='42' data-sf-cr='_sft_42' data-sf-hide-empty='1'>Alaska (5)</option>
<option class="level-0 sf-item-45" value='45' data-sf-cr='_sft_45' data-sf-hide-empty='1'>Florida (1)</option>
<option class="level-0 sf-item-44" value='44' data-sf-cr='_sft_44' data-sf-hide-empty='1'>Montana (1)</option>
<option class="level-0 sf-item-43" value='43' data-sf-cr='_sft_43' data-sf-hide-empty='1'>Oregon (5)</option>
</select></li><li class="sf-field-taxonomy-meals" data-sf-field-name="_sft_meals"><select name="_sft_meals[]" class="postform"><option class='level-0 sf-item-0' value='0'> All Meals</option> <option class="level-0 sf-item-52" value='52' data-sf-cr='_sft_52' data-sf-hide-empty='1'>Bring your own (1)</option>
</select></li><li class="sf-field-taxonomy-overnights" data-sf-field-name="_sft_overnights"><select name="_sft_overnights[]" class="postform"></select></li><li class="sf-field-taxonomy-equipment" data-sf-field-name="_sft_equipment"><select name="_sft_equipment[]" class="postform"></select></li><li class="sf-field-taxonomy-base-price" data-sf-field-name="_sft_base-price"><select name="_sft_base-price[]" class="postform"></select></li><li class="sf-field-submit" data-sf-field-name="submit"><input type="submit" name="_sf_submit" value="Submit"></li><input type="hidden" name="_sf_submitted" value="1" /><input type="hidden" name="_sf_form_id" value="1267" class="sf_form_id" /></ul></form></div></section>