Expand my Community achievements bar.

End user image insert field

Avatar

Level 1

Hello,

I need to create a template that includes areas for the end user to insert photos if needed. If not needed I would like the image box to not be visible and the text to adjust accordingly. Can anyone help?

Thank you in advance!

1 Reply

Avatar

Former Community Member

I would create a subform with the "Image Field".  Set the presence of that subform to hidden.  Add a Checkbox to your form, "add image". When the check box is selected, it will display the subform where users can add an image.

Use this code on the checkbox - Change Event - JavaScript

if

(this.rawValue==1)

    {subformName.presence="visible"}

else

    {subformName.presence="hidden"}

Use the same code in the Inialized Event.  This will save the state of the form after they fill it out and save it.