21278 Posts in 5728 Topics by 2599 members
| Go to End | Next > | |
| Author | Topic: | 2638 Views |
-
Adding html <form> </form> tags in content editor

30 November 2009 at 11:00pm
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
-
Re: Adding html <form> </form> tags in content editor

30 November 2009 at 11:42pm
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#post202803Aaron
-
Re: Adding html <form> </form> tags in content editor

1 December 2009 at 3:39am
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
-
Re: Adding html <form> </form> tags in content editor

1 December 2009 at 11:11am
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
-
Re: Adding html <form> </form> tags in content editor

1 December 2009 at 9:17pm
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
-
Re: Adding html <form> </form> tags in content editor

1 December 2009 at 10:47pm
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
-
Re: Adding html <form> </form> tags in content editor

9 December 2009 at 12:53pm
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?
-
Re: Adding html <form> </form> tags in content editor

9 December 2009 at 8:57pm
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
- FlushT
| 2638 Views | ||
| Go to Top | Next > |


