Mapping Images

28 November, 2018 12:29:40
jstraete
Topics: 34
Messages: 111
Can I see some documentation / get some help on how to map images to a PDF template using a Formidable Form? I have a couple of ways I would ideally like to map an image, but don't know if either of them will work:

1. I would like to have a dropdown menu field in my form where a user makes a selection, and then based on that value, a specific image loads. My guess is that this would be done using separate values somehow in the dropdown menu. For instance:

Menu options (value displayed - value stored)
New Holland Header - www.mysite.com/newhollandheader.jpg
Kinze Header - www.mysite.com/kinzeheader.jpg

Then if I were to insert an Image object on my PDF template and map it to the ID of the dropdown field, would that work?

2. I would also like to add images to my PDF template based files uploaded on a File Upload field in the form. It looks like if I map an Image object to a File Upload field, the Properties shows code like this: [174:1 size='full' show_image='0' add_link='0']. So, I assume the 174:1 means it will map to the first image uploaded, and then I could map a second Image object to 174:2, and so on?

Also, is it possible to modify the shortcode to ensure the image is resized to fit within a 500px by 500px box? I see in the Properties window a Width and Height field that have the values of 100 each in them by default, so I assume that is a % value, and the size of the images uploaded here may always vary, so if there is a way to resize it in pixels that'd be ideal. If not, I believe I can modify the form to resize the image when it was uploaded and handle it that.
28 November, 2018 13:00:44
E2Pdf
Support
Topics: 7
Messages: 3163
Currently all available documentations is located under: Documentation and Formidable Forms extension page. Some points still not there but we are continually work on updates.

1) It's all depending how the final form and logic will look like. It will be great if you show some working example. E2Pdf can work with shortcodes which can be used inside Formidable View or Success Message.
Examples:
- Output the field value [123]
- If checkbox, radio, select then can be: [123 show="value"] or [123 show="label"]
- For repeatable [123:1] [123:2] (1 - is first entry, 2 - is second entry and so on)

* where 123 is Formidable Field ID

2) Yes, you are correct. 174:1 - it's first image, 174:2 - 2nd and so on. Image in any case will be not bigger of your image object. If you will set resize "Width" and "Height" with "Dimension" checkbox - image will be correctly resized by width or height, which is bigger and will save proportions, but if you need "crop" image to fit size - it's not possible by default.

We remain at your service.
We would really appreciate your feedback at WordPress.org!
28 November, 2018 13:39:49
jstraete
Topics: 34
Messages: 111
Thanks for the quick response. The notes from the 2nd item make sense and should work then exactly how I want, so I'm all good there. On the 1st item, I attached a few files as an example of what I'd like to accomplish:

selection-front-end.jpg - Example of what a select field would look like for a user on the front end filling out the form.
selection-form-builder.jpg - Example of how this select field would be setup in the form builder.
pdf-template.jpg - Example of where I would want to display an image based on the item selected in the select form.

So based on my example, the select field is ID 492, and the value stored is the url address of the image I would like to display. So if I put [492 show="value"] in the Properties Value field, would it load the image from the url address stored in the select field?
28 November, 2018 14:38:12
E2Pdf
Support
Topics: 7
Messages: 3163
Yes, you are correct. [492 show="value"] will do the job.

We remain at your service.
We would really appreciate your feedback at WordPress.org!
28 November, 2018 15:05:40
jstraete
Topics: 34
Messages: 111
Awesome!! Thank you very much!