parser


 

 
   команды управления поиском

* UPD: Работает только так

Alexei 06.09.2010 17:13

В первом сообщении, конечно же 2-й size должен быть price_opt_2, price_retail_2
<form method="post" enctype="multipart/form-data">
	Size 1 <input type="checkbox" name="sizes" value="1" checked="checked" />
	Price Opt <input type="text" name="price_opt_1" value="100" />
	Price Retail <input type="text" name="price_retail_1" value="200" />

	<br/>

	Size 2 <input type="checkbox" name="sizes" value="2" checked="checked" />
	Price Opt <input type="text" name="price_opt_2" value="200" />
	Price Retail <input type="text" name="price_retail_1" value="400" />
	
	<br/>
	
	Size 3 <input type="checkbox" name="sizes" value="3" />
	Price Opt <input type="text" name="price_opt_3" value="0" />
	Price Retail <input type="text" name="price_retail_3" value="0" />

	<br/>
	<input type="submit" value="Save" />
</form>


^if(def $form:tables.sizes){
	$sizes[$form:tables.sizes]
	^sizes.menu{
		$price_opt_value[price_opt_$sizes.field]
		$price_retail_value[price_retail_$sizes.field]

		Size $sizes.field <br/>
		Price Opt: $form:$price_opt_value <br/>
		Price Retail: $form:$price_retail_value
	}[<hr/>]
}