Hide a Field by Default


How can I hide a Field by default when the form has loaded and make it appear only when a condition has passed.

I want the 'Is employee terminating assignment' to be hidden by default when the form first loads. IF the first question is answered 'Yes' then i want the second drop down to appear.


Thank you!

Hello @Qman,

Please find the code sample in our documentation here:

Hi @mnikitina,

I have used the examples you have provided but I don't get the outcome I expect.

The 'is the employee terminating one of their assignments' is still visible on form load. I want it to be hidden on form load and then appear if a User selects a Yes/No answer.

I am currently using this code:

//Show/Hides Terminating Assignment Field & More Information Button - [Wizard 1]
fd.spRendered(function() {

function hideOrShowDueDate() {
    if (fd.field('Is_x0020_the_x0020_employee_x0020').value == 'Yes') {
        // Hide Terminating Assignment Field and More information button
        $(fd.field('Is_x0020_the_x0020_Employee_x002').value = 'No');
    } else {
        // Show the field

// Calling hideOrShow when the EmployeeIsLeaving value changes

// Calling hideOrShowDueDate on form loading


Hello @Qman,

Your code has an invalid line that breaks the code:

$(fd.field('Is_x0020_the_x0020_Employee_x002').value = 'No');

Remove it and test the code.

Hi @mnikitina, I actually need this code to populate in another field otherwise the error message will interfere with the user experience.


To set the field value, you don't need to call the jQuery library with $. Use this code:

fd.field('Is_x0020_the_x0020_Employee_x002').value = 'No';
1 Like