Jump to:

23380 Posts in 18311 Topics by 2867 members

General Questions

SilverStripe Forums » General Questions » Adding html <form> </form> tags in content editor

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 2
Go to End
Author Topic: 3429 Views
  • servalman
    Avatar
    Community Member
    211 Posts

    Adding html <form> </form> tags in content editor Link to this post

    Hello Everyone

    I have to add those lines of code to some page in a silverstripe based website :

    It is a paypal page but when I try to add in the HTML editor using the "tinymce_advcode" window it does not work because it does not save it. Do you know where I can find information about that ?

    <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="10028136">
    <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>

    Thanks a lot for any help

  • Double-A-Ron
    Avatar
    Community Member
    604 Posts

    Re: Adding html <form> </form> tags in content editor Link to this post

    This is TinyMCE filters doing their thing for security. There are quite a few posts about on this but basically you need to customize the javascript that does this validation.

    This thread is probably most inline with what you are trying to do. Check out the moxicode link near the bottom of the first page.
    http://www.silverstripe.org/archive/show/202803#post202803

    Aaron

  • servalman
    Avatar
    Community Member
    211 Posts

    Re: Adding html <form> </form> tags in content editor Link to this post

    Hello Thanks for the answer

    It seems to be what I did need but I'm unable to find "tinymce.template.js"

    Can you tell me

    Thank you

  • Double-A-Ron
    Avatar
    Community Member
    604 Posts

    Re: Adding html <form> </form> tags in content editor Link to this post

    Hmm, seems alot has changed with both Tiny and SS since those posts were published. My apologies. That file doesn't exist anymore.

    If you look in /cms/code/LeftAndMain.php, around line 175, you will find the valid_elements and extended_valid_elements declarations. You could just replace one of those with the full XHTML list shown on that moxiecode list.

    Aaron

  • servalman
    Avatar
    Community Member
    211 Posts

    Re: Adding html <form> </form> tags in content editor Link to this post

    Thank you

    I had found it by myself.

    I think I'm going to make a post later this week about that matter because thing's are clear now and I have the feeling that I was not the only one who had this problem.

    Thank's very much for your help

    T

  • Double-A-Ron
    Avatar
    Community Member
    604 Posts

    Re: Adding html <form> </form> tags in content editor Link to this post

    I think I'm going to make a post later this week about that matter because thing's are clear now and I have the feeling that I was not the only one who had this problem.

    Yeah good idea. I wasn't aware it had changed so much myself.

    Aaron

  • Mountbracken
    Avatar
    Community Member
    1 Post

    Re: Adding html <form> </form> tags in content editor Link to this post

    So, did this end up working for the original poster? I was trying to add a paypal form to a clients website, and tried the same thing (adding the full XML list from the moxie site to the leftandmain.php file, but it's still stripping out my form elements. Are there other settings that need to be changed as well?

  • servalman
    Avatar
    Community Member
    211 Posts

    Re: Adding html <form> </form> tags in content editor Link to this post

    Hi

    Yes it worked with the basic paypal form [the one with no multiple choice] but I'm trying to add a mutiple choice form but it is not working because the tags <option> and <select> are iignored and I don't get why .

    I edited LeftandMain.php the same way I did for forms but with no sucess .

    I'm a bit stucked now and so is my client

    Hope I'll find out .

    But for the basic paypal form it works :

    - Edit the LeftandMain.php
    - Add the tags in the valid element list
    - Flush

    T

    3429 Views
Page: 1 2
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.