I am using Chargify to sell some subscriptions online.
They provided hosted pages where you can collect information that leads to the creation of a subscription and customer in their system.
Here's our form page here: https://exponential-finance.chargify.com/h/3373511/subscriptions/new
As you can see, we'd really like to have those fields labeled "Billing Address" instead of "Shipping Address."
Alas, there is no way within Chargify to change those labels. However, the DO provide the ability to load javascript on the page.
I understand that it is theoretically possible to change HTML on a page using a script.
I've spent a couple hours attempting some scripts found online, but none do the job.
Here's an example of a label that I want to change:
<p class="left">
<label for="subscription_customer_attributes_address">* Shipping Address 1</label><br />
<input id="subscription_customer_attributes_address" name="subscription[customer_attributes]
[address]" size="30" type="text" />
</p>
Can somebody point me to a script that would allow me to change the label text from "Shipping" to "Billing" for this field, and even better, for any instance of the word "Shipping?
<script>
window.onload=function() {
var lab = document.getElementsByTagName('label');
for (i=0, l=lab.length;i<l;i++)
{
var old = lab[i].innerHTML;
var news = old.replace(/shipping/i, 'Billing');
document.getElementsByTagName('label')[i].innerHTML=news;
}
};
</script>
JSFiddle: http://jsfiddle.net/2YABH/3/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With