Discussions
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
Edit 'Add to Cart' text within the item list template
I'd like to change the text on the add to cart button based on certain criteria. We are a charity that sponsors kids and has other donation items so I'd like button to say Sponsor Me for the kids and Donate for other items.
I'd like to use javascript to define the text but I can't seem to get the script and input HTML to play nicely together. Any help would be most appreciated.
The input html goes like this:
<INPUT type='button' class='btn-BuyOff' value='cfhi_button_name' id='addtocart' name='addtocart' onMouseOver="this.className='btn-BuyOn'; return true;" onMouseOut="this.className='btn-BuyOff'; return true;" onkeypress="window.event.cancelBubble=true;" onclick="<%=getCurrentAttribute('item','addtocartclickscript')%>">