|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
smarty1 Smarty n00b
Joined: 25 Feb 2018 Posts: 3
|
Posted: Sat Mar 24, 2018 10:47 pm Post subject: html page rendering |
|
|
Hello.
I have the dropdowns now filled via ajax calls in my fields_search_box.tpl file. The problem I now am facing to finish things up is when I choose the Make/Model & then the SubCategory selections from index.php, those particular values don't carry over to the search-results.html page that renders when I click on the 'Search' button on the index page.
Note -If I choose just Make/Model that works to carry the value over to the search-results page.
here is the code for that works for Make/Model <select> tag
{foreach from=$myCars item='option' key='key'}
{$fVal.$fKey = $option.makes_name}
<option {if $fVal.$fKey == $option.makes_name}selected="selected"{/if} value="{$option.makes_name}">{$option.makes_name }</option>
here is the non working code for subcategory that doesn't carry over or cause the Make/Model value carry over either
<select class="multicat {if $smarty.section.multicat.last} last{/if}"
id="{$post_form_key}_{$field.Key}_{$multicat_listing_type}_level{$smarty.section.multicat.index}">
<option value="0">{$lang.any}</option>
Note again that Ajax is working properly to populate initially the subcategory tag on the index page but again causes conflict on search page...
Any help would be greatly appreciated to get my values carried over.
Thanks again for any suggestions! |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Mon Apr 09, 2018 5:56 am Post subject: |
|
|
Note that the double quotes have no effect outside of Smarty tags.
They must be surrounded by {}
Code: | id="{"{$foo}_{$bar}_{$bue}_level{$foo}"}"> |
|
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|