Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Just a quick one out there for you guys, how can i insert normal html form syntax without it being automatically removed from my umbraco page when i click 'update' in the html editor view?
I want to insert the following
type="hidden" value="true" name="spellcheck"/>
I want to insert the following if you copy that into a .txt file and save it as a .html it will make a simple searchbox that will send the form to display search results on the serialssolutions site.
Does anyone know how i can simply 'paste' this into an umbraco page without having to modify xslts or templates?
Your assistance is greatly appreciated!
Hi You can add those elements to the validElements node in the file /config/tinyMceConfig.config. Personally I would create a Macro for this instead of adding it via the editor.
Could you please provide me solution for this:
Thanks for that Richard,
I have added the element into tinyMCEConfig.config, however it only lets me use the form tags <form></form> and removed the contents of the form!
Will become <form></form>
Is there a how to guide for creating a a form macro? or xslt?
It's okay, I've found the solution!
Originally I was focused on changing the TinyMCEConfig.config file under Umbraco\config, but that only works well for people who want to stop html tags from being stripped out of the HTML editor..- Which although i was able to do successfully, didn't solve my problem.
After a few hours of playing around I realised that i had to create an XSLT and macro like Richard had suggested - but this in it's self wasn't the answer to my problem!
After a deeper look into our Umbraco environment I had realised that the masterpage contain a html <form> </form> element that contained many scripts and elements.. so the key issue for me was that without me realising it, i was creating a nested form.. which is not legal HTML and is not understandable by current browsers!
My problems solution -
I added the following to the tinyMCEConfig.config file
NOTE: Once you save this file you will need to go Umbraco\ and open the webdefault.config file and then enter a blank space, and then delete it & save - This will force umbraco to reload these settings without having to restart the application pool.
<!-- note that you will need one for the form tag, and input tag -->
<tinyMceCommand value="" userInterface="true" frontEndCommand="form">form</tinyMCECommand>
<tinyMceCommand value="" userInterface="true" frontEndCommand="input">input</tinyMCECommand>
<!-- put this under plugins -->
<!-- put this under validElements -->
<!-- note that the above line should end with ]]> after it -->
I then created a XSLT file like below -
First travel to the Developer tab and create a XSLT file with the following code
Explanation: I'm not very good with js, however i made a simple script to get the search box contents and then add it to a static URL string which would then be opened in a new window. For me this was the solution i needed without putting in any other extra time, as time is precious!
When you create the above XSLT file it will also create a matching MACRO by default.
Note: The macro settings just need to be default in this scenario, however you will need to select 'Use in editor' for the macro to appear under the WYSIWYG toolbar item called 'Insert/edit macro'
Hope that helps at least someone out there!
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted