Announcement

Collapse
No announcement yet.

Fillable Fields - using PDF Template

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Fillable Fields - using PDF Template

    Hi,
    I'm working with DOMPDF which is great generating data that i have in my EspoCRM Database.
    However, sometimes i need to add manual text or fill in a table manually (ideally).

    When i use the PDF Template, i can generate <input ... /> fields which are displayed correctly, but when i print that PDF it is just not displaying it.

    What i would like to do instead of generating the PDF straight away, i would like to generate my "PDF Template" as HTML with the ability to print it as PDF later, when i filled my Data in that i need to fill in.

    See in my Screenshot below what i get as a preview insight EspoCRM when using an input field and Textarea.

    So creating an HTML page as an option in the menu would generate my complete page as i want it and then i may have a print or "Save as PDF" Button for it.

    Does that make sense?

    For example, if i want to write a letter that i need to attach as PDF or even print to send as a letter. I think that would be great. Let me know what you think. Is that something you thought about?

    Click image for larger version

Name:	image.png
Views:	142
Size:	21.8 KB
ID:	107382
    ​​

  • #2
    Try to copy your PDF code to Email WYSIWYG in code view. I think with little adapting you might be able to use it that way to generate HTML.

    Comment


    • #3
      You can do input field?! Can you share code or documentations?

      Thank you.

      Comment


      • #4
        I do this is in my PDF Template, but the problem is, when i create a PDF from that, the input field is gone. That is the problem:

        <table class="PlInfo" style="width100%; border-collapse:collapse">
        <tbody><tr><td>Input Manual Data here</td>
        <td>End User:</td>
        <td>{{accountName}}</td></tr>
        </tbody></table>​

        Comment


        • #5
          can you share your code, i might be able to help

          Comment


          • #6
            Originally posted by mwo300 View Post
            I do this is in my PDF Template, but the problem is, when i create a PDF from that, the input field is gone. That is the problem:

            <table class="PlInfo" style="width100%; border-collapse:collapse">
            <tbody><tr><td>Input Manual Data here</td>
            <td>End User:</td>
            <td>{{accountName}}</td></tr>
            </tbody></table>​
            I dont see where you add that code for input?

            Comment


            • mwo300
              mwo300 commented
              Editing a comment
              Whooops. i accidently deleted that line

              <td style="width=30%; "><input type="Text" name="No" width="100" control-id="ControlID-319"></td>

            • espcrm
              espcrm commented
              Editing a comment
              Thank you! Sorry I can't help. I will try to play with it and see if there any solution.

          • #7
            Try this, it should work, i have tested it and it worked

            PHP Code:
            <table class="PlInfo" style="width100%; border-collapse:collapse;">
                <
            tbody>
                    <
            tr>
                        <
            td>Input Manual Data here</td>
                        <
            td>
                        <
            div>
                            <
            form>
                            <
            b>End User:</b>
                            <
            input type="text" size="40" name="No" value="100" control-id="ControlID-319"/>
                            </
            form>
                        </
            div>
                        </
            td>
                        <
            td>{{accountName}}</td>
                    </
            tr>
                </
            tbody>
            </
            table>​ 

            Comment


            • #8
              rabii, I tested it, here my results:

              1. it does not work with TCPDF engine (I guess that was not intended at all)
              2. I can input a value manually in PDF edit mode, but it will not be saved. It falls back to the coded value="100"
              3. I guess it was not intended to make a fillable PDF for the printed PDF, right?

              Comment


              • #9
                shalmaxb

                1. it does not work with TCPDF engine (I guess that was not intended at all)

                This won't work with TCPDF. Only works with DomPdf or Mpdf engines.

                2. I can input a value manually in PDF edit mode, but it will not be saved. It falls back to the coded value="100"
                This only prints the input it doesn't allow to change input value AFAK. The value is hardcoded and it won't change.


                3. I guess it was not intended to make a fillable PDF for the printed PDF, right?​
                Correct, i think only allow to display an input and any form elements as a design element.
                Last edited by rabii; 07-09-2024, 11:20 AM.

                Comment

                Working...
                X