Author Topic

steve walker

Monday 23 August 2004 10:30:02 am

Comment41344

Hi,

Have got a form looking like this:

<?php
$search_carat = isset($_GET['search_carat']) ? $_GET['search_carat'] : "7";
$search_clarity = isset($_GET['search_clarity']) ? $_GET['search_clarity'] : "7";
?>

{let exactresults=fetch(content,tree,hash(parent_node_id, 59, 
                                          attribute_filter, array(and,
                                                                  array('stone_product/carat','in','($search_carat)'), 
                                                                  array('stone_product/clarity','in','($search_clarity)'))))
}

<form action={"/gia_certificated_diamonds"|ezurl} method="get">
<div class="maincontentheader">
<h1>Stone Search</h1>
</div>

<div class="block">
<label>{"Carat"|i18n("design/standard/content/search")}</label><div class="labelbreak"></div>
<input class="box" type="text" size="40" name="search_carat" value="{$search_carat|wash}" />
</div>

<div class="block">
<label>{"Clarity"|i18n("design/standard/content/search")}</label><div class="labelbreak"></div>
<input class="box" type="text" size="40" name="search_clarity" value="{$search_clarity|wash}" />
</div>

<div class="break"></div>
</div>

<div class="buttonblock'">
<input class="button" type="submit" name="SearchButton" value="{'Search'|i18n('design/standard/content/search')}" />
</div>

<h2>Display the Results</h2>
values of carat: <?php echo $_GET["search_carat"]; ?>
values of clarity: <?php echo $_GET["search_clarity"]; ?>
{section var=exactresults loop=$exactresults sequence=array(bglight,bgdark)}

   {node_view_gui view=line content_node=$exactresults.item}<br>
  
{/section}

</form>
{/let}

and have put some very simple '<?php echo $_GET["search_clarity"]; ?>' statements into the page to check that the get is working, but no values show up though the data is in the url.

Are there any special considerations to take into account when creating forms in Ez?

Regards, Steve

http://www.oneworldmarket.co.uk