-
I have one module: “Job”
-
Within Job, I have two partials:
_partialA
_partialB
Both partials use the same JobForm.Class.php
Here’s the question/what I’m trying to achieve:
in JobForm.Class.php:
function removeFields()
{
if ($partialName == 'partialA'){
unset ($this['field_a']);
}
if($partialName == 'partialB'){
unset ($this['field_b']);
}
}
Obviously, I’m having difficulty defining “$partialName’
Help? Suggestions? Is there another/better way of going about achieving the same desired result?
Thanks in advance.
I actually used the solution suggested by Andreu Heineken (love the beer, by the way) above, but thanks, Dan, for your solution as well. I just created a new Formclass and extended the baseModule I needed.
Here’s a link for the details: Solution to question