I wish to know how to pre-fill Phoca gallery image to RSform file upload or hidden field so that if a user is viewing images created with Phoca gallery he/she can select an option to order that particular image, then a form opens with that image pre-filled in the form so that the user can fill in the other fields on the form.

A good example can be seen here: http://www.pinkcakebox.com/category/pastry-images/children-cakes/

Here, If you click on any thumbnail, the large image appears with a button on the top right corner asking if you want the said cake, if you click on it, it takes you to the cake order form so that you can order the cake.


You can pre-fill RSForm fields using URL parameters, there's a good guide available here. According to the guide this won't work on hidden fields, though:

This syntax will not work for hidden fields. In such cases you can either, use the last method from this article or use a regular textbox which can be hidden through inline CSS by adding style="display:none;" as an Additional Attribute (edit the textbox > Attributes > Additional Attributes).

Basically, you need to set up a regular textbox, hide it using CSS, then us URL parameters to add content to it, something like this:


In addition, you have to create a template override for the Phoca gallery view you're using in order to add the URL parameters as needed.

  • Thanks so much. I have been able to pass the image into a text field which outputs the correct path. My challenge is having the image display as a thumbnail on the contact form. I would also like to send the image in the admin notification email. I appreciate your time and assistance.
    – kije
    May 2 '17 at 2:52

Not the answer you're looking for? Browse other questions tagged or ask your own question.