felixkat
Senior Member
I was having a little fun trying to get some JS actions to work on a text area element with a Custom Template.
Most things appear to be okay but a Yes\No element with a JS Action to show\hide a text area element failed to work.
After a bit of firebugging I kept finding 'C is Null'.
To cut a long story short it seems to work if I wrap the text element in <li> tags, namely doing something like,
This doesn't appear to happen with field elements though, i.e I don't need the tags.
Around line 203 in \media\com_fabrik\js\form.js says amusingly
// c will be the <li> element - you can't apply fx's to this as it makes the
// DOM squiffy with
// multi column rows, so get the li's content and put it inside a div which
// is injected into c
// apply fx to div rather than li - damn im good
I need to look through this more but I'm curious as to why it works with a field element and not a text area element, the latter having to have the <li> tags.
Most things appear to be okay but a Yes\No element with a JS Action to show\hide a text area element failed to work.
After a bit of firebugging I kept finding 'C is Null'.
To cut a long story short it seems to work if I wrap the text element in <li> tags, namely doing something like,
Code:
<li class="fabrikElementContainer ">
<div class="f_health_chronical_expl">
<?php
$this->element = $this->elements['f_health_chronical_expl'];
echo $this->loadTemplate('element');
?>
</div>
</li>
This doesn't appear to happen with field elements though, i.e I don't need the tags.
Around line 203 in \media\com_fabrik\js\form.js says amusingly
// c will be the <li> element - you can't apply fx's to this as it makes the
// DOM squiffy with
// multi column rows, so get the li's content and put it inside a div which
// is injected into c
// apply fx to div rather than li - damn im good
I need to look through this more but I'm curious as to why it works with a field element and not a text area element, the latter having to have the <li> tags.