0

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.

closed as too broad by Lodder, Terry Carter, Mikan, fruppel, Farahmand Mar 22 '16 at 8:37

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

2

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:

Note:
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:

http://www.example.com/index.php?option=com_rsform&formId=1&form[name_of_field]=NameOfImage

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.