Jump to:

23490 Posts in 18996 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Tiny mce not saving <option> and <select> tags even with LeftAndMain.php edited

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

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

Page: 1
Go to End
Author Topic: 860 Views
  • servalman
    Avatar
    Community Member
    211 Posts

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

    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>

  • tobych
    Avatar
    Community Member
    97 Posts

    Re: Tiny mce not saving <option> and <select> tags even with LeftAndMain.php edited Link to this post

    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/

    860 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.