This topic is locked

Hide / Show detail form conditionally from master table

11/20/2017 2:07:27 PM
PHPRunner General questions
C
cardman3000 author

Hi all,
is it possible that this snippet

$(".rnr-c-details").hide();


not working with PHPRunner 9.8 (Enterprise)?
This is something what I need in my project (to conditionally show or hide detail forms on Edit page depends on control on master page):



var ctrlControlBoxnameOnMaster = Runner.getControl(pageid, 'control box on master page');
$(".rnr-c-detailspagename").hide();

ctrlControlBoxnameOnMaster.on('change', function(e){

if (this.getValue() == 'YES'){

$(".rnr-c-detailspagename").show();

}else{

$(".rnr-c-detailspagename").hide();

}

});


Unfortunately that doesn't work. Maybe one of you knows more?
Thanks in advance

C
cardman3000 author 11/24/2017

This is not a push.
I only need to know: is this approach generally possible or not?
I found here few topics with the same question, but all of them were closed without any answer or solution.
Thanks!

M
macalister 12/4/2017



Hi all,
is it possible that this snippet

$(".rnr-c-details").hide();


not working with PHPRunner 9.8 (Enterprise)?
This is something what I need in my project (to conditionally show or hide detail forms on Edit page depends on control on master page):



var ctrlControlBoxnameOnMaster = Runner.getControl(pageid, 'control box on master page');
$(".rnr-c-detailspagename").hide();

ctrlControlBoxnameOnMaster.on('change', function(e){

if (this.getValue() == 'YES'){

$(".rnr-c-detailspagename").show();

}else{

$(".rnr-c-detailspagename").hide();

}

});


Unfortunately that doesn't work. Maybe one of you knows more?
Thanks in advance


You can inspect (F12) the div that contains the details and hide it.
For example my div that contains my details is <div class="bs-details">

$('.bs-details').hide();
ctrlControlBoxnameOnMaster.on('change', function(e){
if (this.getValue() == 'YES'){

$('.bs-details').show();

}

else{

$('.bs-details').hide();

}

});