In addition, is it possible to create a remove button for fieldset? Thanks again.
Hello @mushiepops
In javascript the plus (+) operator is overloaded, it is used for summing numbers or concatenate texts. If any of operands is a text, the concatenation take precedence. The solution would be solve the ambiguity wit an operation that not affects the result, as follows:
var f = jQuery('[id*="fieldname1_"]');f.val(f.val()*1+1);f.change();
Concerning to your second question, I’m sorry but I don’t understand it totally. If you want to insert a button into a fieldset, select the fieldset field inserted in the form, and then, press the button control in the left bar.
Best regards.
Hello again,
Thank you for the quick reply and taking the time to explain it to me, really appreciate it. As for my second question, I was referring to a feature we normally see on cart page in e-commerce site: besides the number field with increment/decrement button, there is also an “x” or remove button where user can delete the product in case they changed their mind…is that possible or is it a feature only available on premium? Thank you so much.
Hello @mushiepops
The solution depends on the project. For example, if you have a button inserted into a fieldset field, and you want that pressing the button the fieldset be hidden, and ignored the contained fields from the equations, the onclick event of hide button would be similar to:
jQuery(this).closest('fieldset').hide().find('*').addClass('ignore');
But as I said the code would depend on project.
If you need additional help implementing your project, please, do not hesitate in contact us through our private website: Customization
Best regards.
Hi,
This is perfect, thank you for all the help.