I'm sure this is a dumb question. I have an input textarea where the user places <a href....> link code. I want the code to stay as text and not turn into a link when it is viewed in the Email. Changing the Email setting from html to plain text doesn't work.I've searched everywhere, but as I'm self taught, I'm probably not using the correct terminology to even find the attribute or whatever it is that will keep code as text code.
Forums
Keep html input as html
Hi, for the HTML to display as a code, it needs to be inside <pre> tags I believe, google this and use that in the email template code as a container for the text!
Cheers
Max
Cheers
Max
I've tried using pre in the form code and the email code (on the HTML side and on the text side in both cases), but the anchor still renders into a link. I've even used other tags like noscript to no avail. I can't believe there is no way to preserve html as is without replacing the < and such with their code symbols. That works fine when I put in the HTML for display on a page, but doesn't when the user puts it in.
Edit: I checked the database with phpMyadmin and the code still shows as code, while when I look at it in the admin section, it show the active links instead. So somewhere between retrieving it and showing in the email or the backend it gets translated into an active link.
Edit: I checked the database with phpMyadmin and the code still shows as code, while when I look at it in the admin section, it show the active links instead. So somewhere between retrieving it and showing in the email or the backend it gets translated into an active link.
I'm adding a new post because this is a completely different approach. I tried calling an Editor, but 2 problems: one is it's way too wide. It spreads through the right hand column on jaPurity. Second is code as content won't stay just as text code. I just want the capability that if a user puts code into the main box (not the HTML popup page) it stays as code all the way until I get it as a document.
Is it possible for me to add this to the forms?
Edit: I'm getting closer to figuring it out. Here's what I think I have to do to get what I need:
0. I just want a document that show exactly what the user has submitted, without activating link code, but with the labels added
1. Can't use basic chronoforms (even though I have it set up for 6 forms and like it) because if someone puts a formatted article in my article body box, it loses the format and the emailed body section is just one big paragraph. When I add an editor, it won't drop down and left under the box label and it stretches into my right hand column.
2. If I start with your submitcontent plugin, I need to put code in it for all my other input boxes, create db with all the fields etc. Both the article body (to retain format) and the Resource Box (to retain code without it turning into a link) need to use the editor box function you have in the submitcontent form for "Body"
3. Set up email and format it so it looks like a document
4. When I get Email, code in the Resource Box not a link (yeay!) but the code has changed to this:
<a href="JURI::base()//http://www.mygoodstuff.com/">My Good Stuff!!</a>
5. Since it's not editable, I download it as a file
5. Open downloaded file as a Word document
6. Remove the JURI::base() that was added (by the text editor I guess) so I'm left with the non-linking anchor code (which is what I want)
7. Use the document, which now shows exactly what was submitted originally, with the labels added
This seems a cumbersome way to get a copy of what was entered, but I think I can do it if you tell me that's what I need to do.
(I did download the submitcontent plugin and will happily pay if I can use it for this functionality)
Is it possible for me to add this to the forms?
Edit: I'm getting closer to figuring it out. Here's what I think I have to do to get what I need:
0. I just want a document that show exactly what the user has submitted, without activating link code, but with the labels added
1. Can't use basic chronoforms (even though I have it set up for 6 forms and like it) because if someone puts a formatted article in my article body box, it loses the format and the emailed body section is just one big paragraph. When I add an editor, it won't drop down and left under the box label and it stretches into my right hand column.
2. If I start with your submitcontent plugin, I need to put code in it for all my other input boxes, create db with all the fields etc. Both the article body (to retain format) and the Resource Box (to retain code without it turning into a link) need to use the editor box function you have in the submitcontent form for "Body"
3. Set up email and format it so it looks like a document
4. When I get Email, code in the Resource Box not a link (yeay!) but the code has changed to this:
<a href="JURI::base()//http://www.mygoodstuff.com/">My Good Stuff!!</a>
5. Since it's not editable, I download it as a file
5. Open downloaded file as a Word document
6. Remove the JURI::base() that was added (by the text editor I guess) so I'm left with the non-linking anchor code (which is what I want)
7. Use the document, which now shows exactly what was submitted originally, with the labels added
This seems a cumbersome way to get a copy of what was entered, but I think I can do it if you tell me that's what I need to do.
(I did download the submitcontent plugin and will happily pay if I can use it for this functionality)
Hi Jack,
I'm confused now between the 2 posts, please tell me clearly, what did you manage to fix and whats not ?
Cheers
Max
I'm confused now between the 2 posts, please tell me clearly, what did you manage to fix and whats not ?
Cheers
Max
Hi Max -
What I'm trying to do is accept input from other users as an article directory does (not what Joomla calls articles, but what a a directory like EzineArticles does) and let me re-post the contents of the various input boxes just as they were entered. This requires that the article body stay formatted and that the Resource Box accept a href link code without altering it or converting it into a link. I currently have six forms set up with your base program (which is the best forms add on I've found). I've formatted the Emails so I get the input data. The challenges I have with the base forms I'm using now are:
1. All formatting is lost when I get the Email, so paragraphs, lists, etc are just a single runon paragraph
2. The Resource Box link code is saved correctly (without alteration) in the database, but in the Email it converts to a live link with the html hidden like you would see on any web page
In your submitcontent add on, the Article Body input box (which calls an editor) retains the formatting all the way through, so issue #1 can be solved if I combine that type of box functionality with the forms I have. I still have to figure out how to get the Body box with the editor to left justify below the label like it does in your forms layout when I increase the columns to 65. If I just call a php editor for the Body input box in my base form, it stays aligned to the right of the label with the other input boxes, so the editor and its box spread into my right hand module column
For issue 2, however, the HTML, when put into the same type of editor-based input box, becomes corrupted so the result in the Email is half a link and half the html code showing, neither of which is valid. So the only way I know to fix this is to download the Email, which is not editable (it appears to be PDF), open it as a word file and recreate the link code as it was originally written by the submitter. So, either, with a plain box the anchor code turns into a regular link. or with the Editor box, it become corrupted (probably because it is being added from a word program that has added underlying link code to the visible http and www parts of the code. The ideal is to be able to use nesting tags or something to keep HTML content as is without it rendering anything, but I can't find a way to do that.
Sorry I sound like a pain. I know just enough about coding to appreciate people who do it, so thanks for taking the time.
Jack
What I'm trying to do is accept input from other users as an article directory does (not what Joomla calls articles, but what a a directory like EzineArticles does) and let me re-post the contents of the various input boxes just as they were entered. This requires that the article body stay formatted and that the Resource Box accept a href link code without altering it or converting it into a link. I currently have six forms set up with your base program (which is the best forms add on I've found). I've formatted the Emails so I get the input data. The challenges I have with the base forms I'm using now are:
1. All formatting is lost when I get the Email, so paragraphs, lists, etc are just a single runon paragraph
2. The Resource Box link code is saved correctly (without alteration) in the database, but in the Email it converts to a live link with the html hidden like you would see on any web page
In your submitcontent add on, the Article Body input box (which calls an editor) retains the formatting all the way through, so issue #1 can be solved if I combine that type of box functionality with the forms I have. I still have to figure out how to get the Body box with the editor to left justify below the label like it does in your forms layout when I increase the columns to 65. If I just call a php editor for the Body input box in my base form, it stays aligned to the right of the label with the other input boxes, so the editor and its box spread into my right hand module column
For issue 2, however, the HTML, when put into the same type of editor-based input box, becomes corrupted so the result in the Email is half a link and half the html code showing, neither of which is valid. So the only way I know to fix this is to download the Email, which is not editable (it appears to be PDF), open it as a word file and recreate the link code as it was originally written by the submitter. So, either, with a plain box the anchor code turns into a regular link. or with the Editor box, it become corrupted (probably because it is being added from a word program that has added underlying link code to the visible http and www parts of the code. The ideal is to be able to use nesting tags or something to keep HTML content as is without it rendering anything, but I can't find a way to do that.
Sorry I sound like a pain. I know just enough about coding to appreciate people who do it, so thanks for taking the time.
Jack
Hi Max - I think I figured something out. The frustrating thing is that article directories like EzineArticles do what I want to do every day, which is to use input data for re-posting.
I think maybe what article directories do is, a submitter is putting link code for the Resource Box into a box using the html side of a text editor and the body goes into a separate box using the text side of the editor. That way the body stays formatted and the html stays as html. When someone wants to re-post one of their articles they are shown two choices - one is the html side for all the article components and the other option shows the all text sides of the boxes.
If I could call an editor for the Article body box and it is on the text side of the editor by default, users can post from Word and the formatting is retained. Then if I can call a text editor for the Resource Box and have the default be the html side of the editor, the code doesn't get corrupted. Do you think this is even possible?
I think maybe what article directories do is, a submitter is putting link code for the Resource Box into a box using the html side of a text editor and the body goes into a separate box using the text side of the editor. That way the body stays formatted and the html stays as html. When someone wants to re-post one of their articles they are shown two choices - one is the html side for all the article components and the other option shows the all text sides of the boxes.
If I could call an editor for the Article body box and it is on the text side of the editor by default, users can post from Word and the formatting is retained. Then if I can call a text editor for the Resource Box and have the default be the html side of the editor, the code doesn't get corrupted. Do you think this is even possible?
Max, I think I'm making this too hard. I'm going to just access the db info from your admin area, copy and paste it into a Word document. That will be close enough. Can I add editor functionality to the base chronoforms program? I need more than one form, with varying boxes, so I need individual databases, not restricted to the fields in the Joomla content db like the submitcontent pgm appears to be. Also, can I name the text field as labels, like "Your Name", instead of text_9 etc.?
Jack
Jack
Hi jacks,
I will answer you latest question then will tell you my idea about your first problem!
you mean a WYSIWYG editor to the form ? yes, the code for this is at the submitcintent form!
you choose which database table to save the form to, in the submitcontent form, its specified to save to the #__content table!
yes, by editing the code or using the wizard starting from V3.1, pay attention that you can only use a-z and A-Z and 0-9 and underscore characters, don't start the name with a number too!
now to your first problem, you want the code in the database to show as a code, for example a link, you need to convert the code to its htmlentities during the submit and before data is saved or emailed, you can do this in the onsubmit before email box, I suggest you don't try this in V3.1 RC3 since it has some issues with this and I'm fixing it!
example :
Regards,
Max
I will answer you latest question then will tell you my idea about your first problem!
Can I add editor functionality to the base chronoforms program?
you mean a WYSIWYG editor to the form ? yes, the code for this is at the submitcintent form!
I need more than one form, with varying boxes, so I need individual databases, not restricted to the fields in the Joomla content db like the submitcontent pgm appears to be
you choose which database table to save the form to, in the submitcontent form, its specified to save to the #__content table!
can I name the text field as labels, like "Your Name", instead of text_9 etc.?
yes, by editing the code or using the wizard starting from V3.1, pay attention that you can only use a-z and A-Z and 0-9 and underscore characters, don't start the name with a number too!
now to your first problem, you want the code in the database to show as a code, for example a link, you need to convert the code to its htmlentities during the submit and before data is saved or emailed, you can do this in the onsubmit before email box, I suggest you don't try this in V3.1 RC3 since it has some issues with this and I'm fixing it!
example :
<?php
JRequest::setVar("mylink", htmlentities(JRequest::getVar("mylink")));
?>
Regards,
Max
This topic is locked and no more replies can be posted.