I'm trying to do something very basic for now...but can't seem to accomplish this goal. In essence, I have a page that comes before the actual CB registration form that will POST data in a hidden form field...based on the data from that form field, I need to prevent or allow a section of the registration form to draw fields or not draw fields based on said value. That section is simply a tab with CB defined fields that need to be filled in at registration and likely be displayed on the profile. Just like any other tab, except it's a self-coded tab.
it's easier to explain in code...
class getartistsTab extends cbTabHandler {
/**
* Construnctor
*/
function getartistsTab() {
$this->cbPluginHandler();
}
**So here we are telling the tabs fields to show up on the registration form...
function getDisplayRegistration(&$tab,$user,$ui) {
** Now, here I am telling it to redeclare the hidden form fields variable from the PREVIOUS PAGE'S data into a variable called $level**
$level=$_REQUEST["usage"];
** Now, here is where we are having the problem. I already did a print_r($level) to make sure I was getting the value I need to set the condition to draw fields or not, so let's say that variable is '2'**
if ($level==2){
$tab->fields=false;
}
} // end of getDisplayRegistration function
AS you can see I wrote at the end that if that variable level is equal to 2 then don't draw the fields from that plugin on the registration page, yet they still show up. Any help would be appreciated.