You need to sign in to do that
Don't have an account?
Jack Rose 1
Rendering a field from a CommandButton action
Hi All,
I'm not a developer, so apologises if I'm asking a silly question.
I am looking into some code that has been provided to us, for a visual force page using Bootstrap. We have created a web form using visual force.
When the Reason for change field is selected, it opens up a dynamic list of fields, along with a submit button that creates a case (providing no validation rules have been triggered. I have added the continue button below. I'm wanting to control the rendering of the reason field with the button, e.g. the field is only displayed once the button is clicked.
I have started to attempt this in the code but keep hitting errors. any suggestions would be appreciated.
I'm not a developer, so apologises if I'm asking a silly question.
I am looking into some code that has been provided to us, for a visual force page using Bootstrap. We have created a web form using visual force.
When the Reason for change field is selected, it opens up a dynamic list of fields, along with a submit button that creates a case (providing no validation rules have been triggered. I have added the continue button below. I'm wanting to control the rendering of the reason field with the button, e.g. the field is only displayed once the button is clicked.
I have started to attempt this in the code but keep hitting errors. any suggestions would be appreciated.
Create a checkbox field. onclick of button the field will be checked.and check if the field will check that input field will be visible.
Follow this code :
function checkAll(ele) { var checkboxes = document.getElementsByClassName('sel'); if (ele.checked) { for (var i = 0; i < checkboxes.length; i++) { if (checkboxes[i].type == 'checkbox') { checkboxes[i].checked = true; } } } else { for (var i = 0; i < checkboxes.length; i++) { if (checkboxes[i].type == 'checkbox') { checkboxes[i].checked = false; } } } }
<apex:outputPanel id="myPanel" rendered="{!continue}">
---Reason for Change field---
</apex:outputPanel>
Now, add an action to the Continue button to flip the value of variable "checkbox" to true and pass the id "myPanel" in rerender.