5

I want to make an entry field appear only when a certain selection from the previous drop down list is selected.

For example,

I want the user to select from (laptops, desktops and scanners).

I want a field for the RAM amount to only appears when the user select laptops or desktops only, and keeps hidden (it should be hidden by default) if he selects scanners.

3

Assuming is infopath, you can create a new rule in your "RAM" Field.

Select the "RAM" Field

Go to properties tab > Manage rules

On manage rules window, click "New" > "Formating/Format"

Check the checkbox, hide this control.

Create a new condition for this rule, something like:

if "device" field equals to "Desktop" Or >>

if "device" field equals to "Laptop"

Then click OK

So if your device field is not desktop or laptop the RAM field will not appear.

Remember to change the RAM field to not required.

Hope it helps.

Edited: Condition of the rule Notequals to equals

  • but using this it makes the Ram field appeared by default and gets hidden when laptops or desktops are chose, also please note that the type is a drop down list – Hicham Kandil Oct 30 '15 at 14:10
  • Just change the condition, equals to notequals – Thales Chemenian Oct 30 '15 at 15:40
2

Add Script Editor Web Part to the form with the following type of jQuery code.

Note that you will need to get hold of the correct drop down, so the jQuery selector for the drop-down is just a sample:

$("input[title='Computer Type']").on("change", function (e) {
    if ($(this).val() == "Laptop" || $(this).val() == "Desktop") {
        $("input[title='RAM']").parents("tr").hide();
    }
    else {
        $("input[title='RAM']").parents("tr").show();
    }
});
2

Create a rule in RAM field.

FORMATTING RULE

The rule condition should be if Drop Down is equal to scanners OR if Drop Down is Blank. Then check the "Hide this field" option.

You may also need to put a clear rule. You will need this if a user, for example, selected laptop then selected a RAM value. Then changed his mind and selected scanners instead. You need a clear action rule so it won't save the previous value selected for laptop.

ACTION RULE

Condition is when Drop Down field is equal to scanners OR Drop Down is blank.

Action is Set the RAM field to (no need to put anything) .

0

It sounds like you are looking for something along the lines of cascading dropdowns (if you are using infopath) logically its pretty straightforward - these two links will help you understand what you need to do.

Hope they help!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.