RadEditor to fill in form and export to PDF

4 posts, 0 answers
  1. Jay
    Jay avatar
    59 posts
    Member since:
    Apr 2009

    Posted 19 Feb 2013 Link to this post

    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
  2. Rumen
    Admin
    Rumen avatar
    14010 posts

    Posted 21 Feb 2013 Link to this post

    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.
  3. Jay
    Jay avatar
    59 posts
    Member since:
    Apr 2009

    Posted 21 Feb 2013 Link to this post

    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?
  4. Rumen
    Admin
    Rumen avatar
    14010 posts

    Posted 22 Feb 2013 Link to this post

    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.
Back to Top