This is a migrated thread and some comments may be shown as answers.

RadEditor to fill in form and export to PDF

3 Answers 104 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Jay
Top achievements
Rank 1
Jay asked on 19 Feb 2013, 04:01 PM
I'm trying to find a solution that solve the following challenge:

1. Load up pre-existing HTML code that will display as a Form
2. Allow users to fill in data using the controls (textboxes, dropdowns, etc.) that were loaded up in the HTML
3. Be able to lock down the rest of the HTML so user are only interacting with the controls
4. Export to a PDF after the user has completed filling in their data.

Can RadEditor do all of this?
Jason

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 21 Feb 2013, 12:49 PM
Hello,

You can import and export HTML content in the editor via its Content property.
It is partially possible to lock some HTML elements but not completely because the user can do Ctrl+A (Select All) and erasing the content by pressing the Delete/BackSpace buttons.
You can see how to export the content to PDF in this live demo: Export To PDF.

Kind regards,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Jay
Top achievements
Rank 1
answered on 21 Feb 2013, 01:59 PM
Rumen,
I'm having issues getting the values of any input controls within the content of the editor. 
The goal is to use this HTML as a form to provide a more user friendly data collection screen compared to just a label and textbox in the asp.net markup.

Can you provide an example of finding an input control within the content when the Export To PDF method is called please?
0
Rumen
Telerik team
answered on 22 Feb 2013, 02:18 PM
Hello,

You can access the input elements in the content are using the following code: editor.get_contentArea().getElementsByTagName('input') where editor is a reference to the RadEditor and this will return a list with all inputs there so you can modify them as needed.


Regards,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Editor
Asked by
Jay
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Jay
Top achievements
Rank 1
Share this question
or