Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Tiny mce not saving <option> and <select> tags even with LeftAndMain.php edited


Go to End


2 Posts   1187 Views

Avatar
servalman

Community Member, 211 Posts

9 December 2009 at 7:13am

Hi

I'm trying to add a paypal form to the site
To do that I have been editing the 'LeftAndMain.php' to add 'valid_elements' to the HTML editor

It works fine for <form> and <input> etc. but I'm unable to add <option> and <select> tags

any idea ?

Thanks a lot for any help

below is my paypal code

<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="10216291">
<table>
<tr><td><input type="hidden" name="on0" value="PAYS">PAYS</td></tr><tr><td><select name="os0">
<option value="France métropolitaine">France métropolitaine €6,00</option>
<option value="Dom-Tom et Étranger">Dom-Tom et Étranger €8,00</option>
</select> </td></tr>
</table>
<input type="hidden" name="currency_code" value="EUR">
<input type="image" src="https://www.paypal.com/fr_FR/FR/i/btn/btn_cart_LG.gif" border="0" name="submit" alt="PayPal - la solution de paiement en ligne la plus simple et la plus sécurisée !">
<img alt="" border="0" src="https://www.paypal.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
</form>

Avatar
tobych

Community Member, 97 Posts

27 December 2009 at 4:17pm

You're best off including your PayPal form in the templates rather than in the page content. If you need to determine where the form gets included in the content, you could define your own placeholder for use in the content, and replace this with the form using a custom text parser.

See http://www.ssbits.com/embedding-youtube-or-vimeo-inside-your-text-content-using-a-custom-textparser/