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.

General Questions /

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

Adding html <form> </form> tags in content editor


Go to End
Reply


14 Posts   3653 Views

Avatar
Double-A-Ron

Community Member, 604 Posts

9 December 2009 at 11:04pm

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

Avatar
servalman

Community Member, 211 Posts

9 December 2009 at 11:15pm

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

Avatar
Double-A-Ron

Community Member, 604 Posts

9 December 2009 at 11:17pm

Hi servalman,

How are you with PHP?

Avatar
servalman

Community Member, 211 Posts

9 December 2009 at 11:25pm

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

Avatar
tobych

Community Member, 97 Posts

14 December 2009 at 10:06am

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

Avatar
Rishi

Community Member, 97 Posts

20 January 2010 at 11:40pm

Edited: 21/01/2010 7:16am

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

Go to Top