Jump to:

22977 Posts in 11806 Topics by 2826 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: 3235 Views
  • Double-A-Ron
    Avatar
    Community Member
    599 Posts

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

    Whilst this work around should work, it will always be problematic to try and make a wysiwig editor like this do what you want with HTML like that.

    You may find that you are far better off just creating a new page type with a template, and simply embed the HTML in the template. Certainly if you are still having trouble with this, you will find that this method is far quicker, and more stable.

    Aaron

  • servalman
    Avatar
    Community Member
    211 Posts

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

    Hi

    I'm sure you'r right about that.

    But my problem is taht there is one code for each item with the paypal system + multi choice dropdown and I don't think I'm good enough at silverstripe (i'm only starting) to do taht properly and fast enough

    But thanks for pointing the right direction

    T

  • Double-A-Ron
    Avatar
    Community Member
    599 Posts

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

    Hi servalman,

    How are you with PHP?

  • servalman
    Avatar
    Community Member
    211 Posts

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

    I'm getting to know it ;)

    I was able to modify templates in SS or create a new page type, add fieds in the editor basic things

    I'm sure I could find a way to crate a function that allow me to add paypal ocdes to my template but i'm so short on time

    I was thinking to od that on the V2 of the website wich would have left me more time.

    I took the hardcoded way because it seems to wrok fine as far as adding <form> or <input> or <name> to the editor and I'm suprised I can't do the same with <option> and <select>

    Anyway As i'm designer i'm much more confortable with css files.

    If you have a suggestion

    Thanks

    T

  • tobych
    Avatar
    Community Member
    97 Posts

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

    I imagine you'd be best off finding someone to help you define a method in the controller of your product page types, or whatever you have, that generates the appropriate PayPal HTML code, or at least the parts of it that change. I'd be very surprised if the effort you might put into solving the problem as you currently are would pay off in the long term.

    So you'd have:

    class Product_Controller extends Page_Controller {

    ...

    public function getPayPalHTML() {
    return /* the HTML /*;
    }

    }

    And in your template:

    ...
    $PayPalHTML
    ...

    Toby

  • Rishi
    Avatar
    Community Member
    97 Posts

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

    hello
    i need to do the same thing, but little bit modification,i am inserting a flash player so that when i add any flash from admin editor then it will show in a player which is saved in a folder named as flash1 under assest along with js file

    3235 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.