You need to sign in to do that
Don't have an account?
Kevin Richardso
Dynamic Form Field - Newbie Question
I am wanting to put a checkbox that, when checked, displays further fields that are normally hidden. Any ideas?
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
This hides a button if the conference is in a certain stage.. apply your own logic.. also notice the frametarget line.. the id will be unique to your scontrol.. you will need to create a scontrol with html which contains this code..
<html>
<head>
<script src="/soap/ajax/8.0/connection.js">
</script>
<script>
function initPage()
{
//alert('starting function');
// hack to fix sf.com short comings.. that id is the scontrol Id.. we are getting it.. to hide it..
var currentfr = parent.frames.document.getElementById('01N300000009eX5');
currentfr.style.height = '0px';
var currentStage = '{!Conference_Proposition__c.Review_Status__c}';
//alert(currentStage);
var controls = parent.frames.document.getElementsByTagName('INPUT');
//alert('Controls Selected: ' + controls.length);
for (var n=0; n<controls.length; n++)
{
if( controls[n].type == 'button')
{
// Not Submitted section
if ( currentStage == "Not Submitted")
{
//alert(controls[n].name);
if ( controls[n].name == 'conference_proposition_review' )
{
controls[n].disabled = 'true';
controls[n].style.visibility = 'hidden';
}
} // end of if type = button
} // end of for each control
} // end of function
</script>
</head>
<body onload="initPage();">
</body>
</html>
// hack to fix sf.com short comings.. that id is the scontrol Id.. we are getting it.. to hide it..
var currentfr = parent.frames.document.getElementById('01N300000009eX5');
currentfr.style.height = '0px';
if you don't do this you get the gray scontrol box.. not really a short coming.. just ugly :)