jordito Posted July 12, 2016 Share Posted July 12, 2016 Hello, when I change the textarea customizable field: <textarea name="textField{$field.id_customization_field}" class="form-control customization_block_input" id="textField{$customizationField}" rows="3" cols="20">{strip} {if isset($textFields.$key)} {$textFields.$key|stripslashes} {/if} {/strip}</textarea> to: <input name="textField{$field.id_customization_field}" class="" value="{if isset($textFields.$key)}{$textFields.$key|stripslashes}{/if}" id="textField{$customizationField}"> It shows an error after click on Add to cart button "Please fill in all the required fields before saving your customization." Does anyone have any idea why it happens? Thanks! Link to comment Share on other sites More sharing options...
Knowband Plugins Posted July 14, 2016 Share Posted July 14, 2016 It seems that there is some code which is fetching value from the text area and not from input field therefore when you are changing element, it is not able to fetch the required value and giving validation error. PS: Why do you want to change this field type? Link to comment Share on other sites More sharing options...
OpenSource Expert Posted July 27, 2016 Share Posted July 27, 2016 you need to change in two files product.tpl and tools.js In product.tpl need to change <input name="textField{$field.id_customization_field}" class="form-control customization_block_input" id="textField{$customizationField}" rows="3" cols="20" value="{strip} {if isset($textFields.$key)} {$textFields.$key|stripslashes} {/if}{/strip}"> </li> {counter} {/if} {/foreach} </ul> </div> {/if} and in tools.js Replace if (parseInt(customizationFields[i][1]) == 1 && ($('#' + customizationFields[i][0]).html() == '' || $('#' + customizationFields[i][0]).text() != $('#' + customizationFields[i][0]).val()) && !pattern.test($('#' + customizationFields[i][0]).attr('class'))) with if (parseInt(customizationFields[i][1]) == 1 && ($('#' + customizationFields[i][0]).val() == '' || $('#' + customizationFields[i][0]).text() == $('#' + customizationFields[i][0]).val()) && !pattern.test($('#' + customizationFields[i][0]).attr('class'))) Link to comment Share on other sites More sharing options...
OpenSource Expert Posted August 1, 2016 Share Posted August 1, 2016 Hello Jordito, Is your problem solved? Waiting for your response. Regards 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