This topic is locked

HIDE/SHOW CHECK BOX DEPENDING THE USER'S GROUP

3/7/2012 10:11:08 AM
PHPRunner General questions
C
ckapote author

HI,
IN ADD AND LIST PAGE CALLED SIGNPAGE I HAVE FOUR (4) CHECK BOXES .
I NEED DEPENDING ON USER TO HIDE THE THREE AND LEAVE THE ONE THAT MUST CHECK THE CERTAIN USER .
SO BY THAT WAY IT WILL PUT HIS ELECTRONIC SIGNATURE FOR MY RECORDS .
PLS HELP

C
ckapote author 3/7/2012

Thank you Cristian .
For example if the field name is 'box1' and the user is 'DPA' then is it correct the following ?
$xt->assign("Horsepower_box1",$_SESSION["UserID"]=="DPA");
or please correct
thanks



Check this article: http://xlinesoft.com/phprunner/docs/hide_controls_on_add_edit_pages.htm

Sergey Kornilov admin 3/7/2012
$xt->assign("box1_fieldblock",$_SESSION["UserID"]=="DPA");
C
ckapote author 3/9/2012

HI,
something final
how can I pop up a msg "bdbdbdd" when they click/select on that check box
thanks


$xt->assign("box1_fieldblock",$_SESSION["UserID"]=="DPA");


C
cgphp 3/9/2012

If your HTML code is something like:

<input type="checkbox" id="check1" value='1'>

<input type="checkbox" id="check2" value='2'>


In the "Javascript onload" event enter the follwoing code:

$("input[type='checkbox'][id^='check']").click(function(e){

if($(this).is(":checked"))

alert("You have selected the item number: " + $(this).val());

});