Depends on another field

web dev asked on June 5, 2018 16:50

hello kentico dev i create a page type of jobs and i want show company field Depend on location name i try this macro in page type feild of company {% if(Location.Value == "LGH" || Location.Value == "CAMPUS"){ %} {%Company.Value =="LGH" %} {% } #%} but its not work thanks

Correct Answer

Rui Wang answered on June 5, 2018 20:45

  1. Make sure the Location field has "has depending field" checked.
  2. For Company field, check "depending on another field" and set the visible condition to be Location.Value == "LGH" || Location.Value == "CAMPUS"
1 votesVote for this answer Unmark Correct answer

Recent Answers


web dev answered on June 6, 2018 11:48 (last edited on June 6, 2018 11:58)

hi Rui Wang thanks for answer but i want put this macro in default value of field depend on another field

0 votesVote for this answer Mark as a Correct answer

Rui Wang answered on June 6, 2018 14:24 (last edited on December 10, 2019 02:31)

for company field, if it's a Text Box form control you can use {% Location.Value |(identity)GlobalAdministrator%}

0 votesVote for this answer Mark as a Correct answer

joyanta sen answered on November 14, 2018 18:03

Hi Rui, I have account registration form and there I am doing the similar thing but on dropdown selection change page is getting posted back and I am loosing the other textbox(password) value. Could you please tell me how to resolve that?

Thanks Joyanta

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.