• hi, first thank you for the tips.

    my question.
    how can I display a media field (filled with a picture) in the thanks page.
    Can I adjust the size?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @uwekersten,

    If it is an “Upload File” field, for example, assuming it is the fieldname1, in the thank you page you can include an image tag as follows:

    
    [CP_CALCULATED_FIELDS_RESULT]
    <img src="<%fieldname1_url%>" style="width:100px;height:100px;" />
    [/CP_CALCULATED_FIELDS_RESULT]
    

    As you can see, the width and height of the image is defined directly into the tag.

    However, if you want to insert an image directly, not uploaded through the form, the process is as simple as insert the image tag in the content of thank you page.

    Best regards.

    Thread Starter uwekersten

    (@uwekersten)

    hi,

    it′s not a upload file.
    it is a media field.
    select media type = Image
    and then in field source htt……………….

    Plugin Author codepeople

    (@codepeople)

    Hello,

    In this case you know what is the image’s URL, and you simply should insert the <img> tag into the thank you page.

    Best regards.

    Thread Starter uwekersten

    (@uwekersten)

    I must have to access the mediafield in the thanks page because depending on other fields the image from mediafeld1 or mediafeld2 must be displayed. So I need an information from the mediafeld in the thank you page.

    Plugin Author codepeople

    (@codepeople)

    Hello @uwekersten,

    You can include in the thank you page the fields submitted by the form, but a form only submits the tags: input, select and textarea, and the media field is not one of them.

    So, if you are varying the media’s URL programmatically at runtime, I recommend you to insert a hidden field in the form, and assign to it the URL to the image file. For example, if the name of the hidden field with the image’s URL is fieldname123, the shortcode in the thank you page can has the structure:

    
    [CP_CALCULATED_FIELDS_RESULT]
    <img src="<%fieldname123_value%>" style="width:100px;height:100px;" />
    [/CP_CALCULATED_FIELDS_RESULT]
    

    and that’s all.
    Best regards.

    Thread Starter uwekersten

    (@uwekersten)

    yes I understand.

    but what kind of hidden field do I have to use and how do I get the url of the image from the mediafield?

    Plugin Author codepeople

    (@codepeople)

    Hello,

    The process depends to your project. Please, send me the link to the webpage where the form is inserted and indicate the images you want to display on the thank you page.

    Best regards.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘media field display in thanks page’ is closed to new replies.