Hi Obbie,
I didn’t write a function to replace the output sadly, as I only need a very simple newsletter signup field. I simply saw where the script was posting to, and I used some PHP variables to build the URL to the post form, and I was able to customise this then.
<form method="post" action="<?php echo 'https://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; ?>" id="constant-contact-signup" name="constant-contact-signup">
<div id="mailingform">
<input type="text" value="ENTER EMAIL ADDRESS" name="fields[email_address][value]" id="cc_email" onfocus="if(this.value=='ENTER EMAIL ADDRESS') this.value='';" onblur="if(this.value=='') this.value='ENTER EMAIL ADDRESS';" />
<input type="hidden" name="cc_newsletter[]" id="cc_newsletter-4" value="4" />
<input type="hidden" id="cc_referral_url" name="cc_referral_url" value="<?php echo bloginfo('siteurl').'/thank-you-for-subscribing/'?>" />
</div>
<button id="mailingsubmit" name="constant-contact-signup-submit" value="Signup" class="button submit"></button>
</form>
I’m sure from here you could incorporate your PayPal code, and expand on the fields being posted to Constant Contact.
Good luck,
Harry