banel Posted November 18, 2013 Share Posted November 18, 2013 (edited) Hello, In "Customizable products" I want to have an input field instead of the textarea. Anyone knows how to do it? Regards. Edited November 18, 2013 by banel (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted November 18, 2013 Share Posted November 18, 2013 product.tpl file, you've got there code: {foreach from=$customizationFields item='field' name='customizationFields'} {if $field.type == 1} <li class="customizationUploadLine{if $field.required} required{/if}"> <label for ="textField{$customizationField}">{assign var='key' value='textFields_'|cat:$product->id|cat:'_'|cat:$field.id_customization_field} {if !empty($field.name)}{$field.name}{/if}{if $field.required}<sup>*</sup>{/if}</label> <textarea name="textField{$field.id_customization_field}" id="textField{$customizationField}" rows="1" cols="40" class="customization_block_input">{if isset($textFields.$key)}{$textFields.$key|stripslashes}{/if}</textarea> </li> {counter} {/if} {/foreach} change textarea to input: <textarea name="textField{$field.id_customization_field}" id="textField{$customizationField}" rows="1" cols="40" class="customization_block_input">{if isset($textFields.$key)}{$textFields.$key|stripslashes}{/if}</textarea> remember to use the same name, id and also value Link to comment Share on other sites More sharing options...
banel Posted November 19, 2013 Author Share Posted November 19, 2013 Hello, Thank you for your help. I changed the textarea wint input like this: <input type="text" name="textField{$field.id_customization_field}" id="textField{$customizationField}" class="customization_block_input">{if isset($textFields.$key)}{$textFields.$key|stripslashes}{/if}</input> Is this correct? Because when I click on "Enregistrer" I have this: and the values are not saved. Regards Link to comment Share on other sites More sharing options...
vekia Posted November 19, 2013 Share Posted November 19, 2013 value of the input please insert inside value="" parameter <input value="{if isset($textFields.$key)}{$textFields.$key|stripslashes}{/if}"> Link to comment Share on other sites More sharing options...
01Please Posted August 17, 2015 Share Posted August 17, 2015 How to change the textarea into SELECT element ? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now