How can I show an image inside of a text area using CSS?

  • jameshogan
    Asked on November 7, 2014 at 5:21 PM
    Hi Raul

     

    Can you advise why I cannot see my custom CSS to show image inside the Text Area?

     

    Please see both Text Box - TEST Field

    and

    Text Area - Lone Working

     

    Both show the image in the editor but not when I open the form link directly

  • jameshogan
    Replied on November 7, 2014 at 5:25 PM

    Also,  if an image can be placed inside a text area, will the image show in the PDF Submission?

     

    Really appreciate all the help!

     

    James

  • David JotForm Support Manager
    Replied on November 7, 2014 at 5:39 PM

    How about using the image field? It can be found under Form Tools:

    How can I show an image inside of a text area using CSS? Image 1 Screenshot 30

    See this example: http://form.jotform.co/form/43107308046851

    The images can be shown on you PDF submission, you just have to check the "Show headers and text" option when you are on the submission view:

    How can I show an image inside of a text area using CSS? Image 2 Screenshot 41

    Hope this helps you, let us know if you have more questions, we will be glad to assist you.

  • jameshogan
    Replied on November 7, 2014 at 6:18 PM

    I need to only show specific images based on conditions... as per my initial tread http://www.jotform.com/answers/455532

     

    That is why I want to place an image in a text area so this can happen...

     

    Thanks,

     

    James

  • Charlie
    Replied on November 7, 2014 at 7:31 PM

    Hi James,

    I'm not sure if I understood it correctly.

    But this is how I see it:

    1. You have these HTML fields which has icons on them that represents a warning message on the choices you have in "Identified of Key Hazards"

    2. When a checkbox is ticked, you want the HTML field to show

    I've cloned your form and if what I mentioned is that one that you are looking for, you can actually display/show the free HTML field directly with the condition.

    You can check the live form here: http://form.jotformpro.com/form/43107111452945?. Let me know if that is what you want to achieve. You can clone my form by following this guide: http://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL 

    Quick screenshot demo of the cloned form:

    1. I chose "Hotwork Operations" in the checkboxes.

    How can I show an image inside of a text area using CSS? Image 1 Screenshot 50

     

    2. It will then display the HTML field with the warning icon for "Hotwork Operations".

    How can I show an image inside of a text area using CSS? Image 2 Screenshot 61

     

    3. This is how my "Conditions" setting is set up.

    How can I show an image inside of a text area using CSS? Image 3 Screenshot 72

    How can I show an image inside of a text area using CSS? Image 4 Screenshot 83

     

    I haven't tried doing a test submission, but I believe my colleague, BDAVID, has pointed out the "Show Headers & Text", this should show the HTML fields that are displayed by conditions only.

    Let me know if I misunderstood the workflow process that you have in mind.

    Thank you.

     

  • jameshogan
    Replied on November 8, 2014 at 7:37 AM

    There are 2 items to clarify...

    1.

    I have tried setting the conditions on the HTML Fields before, however when I set the "Show Headers & Text" all HTML Fields show regardless of the condition setting.

    2.

    What I'm looking to do now is insert an image in the background of a Text Area - If an image can be placed in a Text Area it may show up in the PDF Submission based on Conditions.

    I'm trying this as I need to show specific images in the pdf.

  • abajan Jotform Support
    Replied on November 8, 2014 at 10:49 AM

    Hello James,

    Just to add my two cent's worth to the discussion, is it my understanding that you have been using conditions in concert with the Show Headers and Texts feature to toggle the visibility of an image? If so, that wouldn't work. The Show Headers and Text feature controls whether headers and text elements are displayed in emailed notifications. However, as Charlie has earlier stated, it is feasible to place an image in an HTML field and have it shown or hidden based on a condition or conditions.

    As far as placing an image in a text area goes, my research indicates that this isn't feasible. Even if we were to get it working in one browser, it would likely fail in others.

    Thanks

  • jameshogan
    Replied on November 8, 2014 at 11:04 AM

    Hi Shadae,

    On your first question - Yes! you are correct.

    On your second - Yes! at the time I was only able to see the image in the editor mode.I have since figured out the CSS.

    I'm working on form: 43074216409956

     

    Hi Abajan,

    I have tried to set conditions on the HTML Fields and have it shown or hidden based on a condition or conditions. But regardless of the condition(s) all HTML Fields Show in the PDF. Maybe I have missed something on condition settings - please advise!

    Conditions for the HTML Field is only attributable to the form when online, unfortunately it does  not seem to be attributable on the PDF Report/Submission.

    I was able to figure out the CSS to place an image in the background of a text area across all browsers (IE10, Chrome, FireFox, Safari). But CSS is again only attributableto the online form and not on the PDF Report/Submission.