Balbooa Gallery Update

Balbooa Gallery 2.3.2 Released With Joomla 4 Compatibility
Mon. - Fri. 9 am - 5 pm Ask a Question
Remember me

popup form from custom image

3 years 1 week ago #1

  • Mike's Avatar
  • Mike
  • Posts: 24
Hello

I would like to find a way to have one of my forms to be triggered by a custom image, instead of the default link or button included in the Forms component. Is there a JS shortcut to do this? Im using JCE editor as my Joomla editor, thanks.

3 years 1 week ago #2

  • Vyacheslav's Avatar
  • Vyacheslav
  • Posts: 18042
Hello,

You need to add custom class "forms-trigger" for your images
continue to do as described in this post:
support.balbooa.com/forum/joomla-forms/1...tbox-popup-form#4324

Regards,
Vyacheslav, Balbooa.com

3 years 1 week ago #3

  • Mike's Avatar
  • Mike
  • Posts: 24
Ok, that mostly makes sense...however that thread focuses on adding a popup trigger to a menu item and not an image so I think I need to make a few tweaks..here is what I did:

1. Added the JS:

jQuery(document).ready(function(){
jQuery(".forms-trigger").on('click', function(){
jQuery('[data-popup="popup-form-1"]').trigger('click');
})
})

2. Inserted an image into my HTML with the following markup:

<img id="forms-trigger" src=" " alt=" " width=" " height=" " />


So that didnt work..is there something Im missing here? Thanks

3 years 1 week ago #4

  • Vyacheslav's Avatar
  • Vyacheslav
  • Posts: 18042
Hello,

We wrote to you earlier:
Vyacheslav wrote:
You need to add custom class "forms-trigger" for your images
but you added id
Mike wrote:
<img id="forms-trigger" src=" " alt=" " width=" " height=" " />

Best Regards,
Vyacheslav, Balbooa Support Team

3 years 1 week ago #5

  • Mike's Avatar
  • Mike
  • Posts: 24
Ah, the little things in web development...thank you for your assistance this was a great help.

3 years 1 week ago #6

  • Vyacheslav's Avatar
  • Vyacheslav
  • Posts: 18042
You are welcome ;)
Powered by Kunena Forum