[SOLVED] Form details doesn't hide elements defined to be hidden using JS on load events

Status
Not open for further replies.

gnavarro

Member
Hi,

My config:
Fabrik 3.2
Joomla! 3.4
Template - Protostar
Updated from github
Access to site admin in my Fabrik account

I've added specific JS on load and click events to my forms but for one of those forms the load events only work when editing the form and not when viewing the details! Am I missing something?
 
I don't know your JS and/or if you are using a custom details template etc.
But in details view the Fabrik element classes are "fb_el_xxx_ro"
 
I've added specific JS
I thought you had some custom JS, not built in ones.

Onload built in events (hide/show an other element) is working on my site.
What are you trying to do where?
 
I think the problem is in the first onLoad event on the page, on the 'id' element:

Code:
Fabrik.getBlock('form_11').elements.get('fb_tratamento_fisiot___notific').update('1');

In a details page a) you can't update() things, and b) there won't be a form_X block, it'll be details_X. So you should probably change that to be something like ...

Code:
if (Fabrik.getBlock('form_11') !== false) {
   Fabrik.getBlock('form_11').elements.get('fb_tratamento_fisiot___notific').update('1');
}

-- hugh
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top