1. Fabrik 3.9 has been released. If you have updated Joomla to 3.9, this is a required update.
    Dismiss Notice

using if else statement in custom ajaxify list template

Discussion in 'Community' started by mahmoodee, Oct 21, 2019.

  1. mahmoodee

    mahmoodee Member

    Level: Community
    Hello ,
    I have created custom ajaxify Div List template using this wiki
    http://fabrikar.com/forums/index.ph...t-template/#example-ajaxify-div-list-template
    I am using a custom button above list to update the list when click the button
    Code (Text):
    <INPUT type="button" class="btn bupdate" value="Update the list" name="btnRefresh" onClick="Fabrik.blocks['list_<?php echo $this->table->renderid;?>'].updateRows();">
    Everything works fine , but I'm having the following problem :
    In custom template I am using "if else" statement to check "yesno element" value
    Code (Text):
        $status=$this->_row->data->students___status_raw;
        if($status==1){
            //code1
        }
        else
        {
             //code2
        }
       
       
    On page load or refresh browser the " if statement" work fine and execute the "
    if($status==1){
    //code1
    }
    "
    but if I click on button to refresh list using ajax it execute
    "
    else
    {
    //code2
    }
    "
    Why updateRows() not return the correct value of $status ?
    thank you
     
  2. mahmoodee

    mahmoodee Member

    Level: Community
    any suggestions :)
     

Share This Page