Sync two Lookup Fields in the same form

By: Giorgos Nikolaidis | Asked: 06/02/2025
ForumsCategory: Code SnippetsSync two Lookup Fields in the same form
Giorgos Nikolaidis asked 2 weeks ago

Hello,

I have two lookup fields which controls different dropdown fields and I want to sync their values so the user only select an option on the first lookup field and not at the second one which will copy the value from the first.

How can I accomplish that? Do I have to create custom code (JS) or is there a more simple way?

I have formidable Elite.

Regrads

Giorgos Nikolaidis

Victor Font Staff replied 2 weeks ago

I don't understand what you are trying to do because it makes no sense in terms of the single source of truth principle of data management. Please explain your process and goals and what you've done to realize the requirement.

Victor Font Staff replied 2 weeks ago

Also, are your lookup fields standard or dynamic?

1 Answers
Giorgos Nikolaidis answered 2 weeks ago

Thanks for the responses. I am a beginner with formidable so show some sympathy.I have a lookup field (Camping_Period_Lookup) which gets its options from CampCentres Form with two text fields: Camp_Period_Text and Camp_Centre_Text.Then I have a lookup field (Camping_Centre_Lookup) which gets its options from the same form (Camp_Centre_Text field) and filtered by the Camping_Period_Lookup field.This works as expected. Now I want to implement the same but with another form (CampPeriods Form) which has two text fields: Camp_Period2_Text and Next_Camp_Period2. I can easily do this by adding two lookup fields in my base form which will get options from the CampPeriods Form: Camp_Period2_Lookup and Next_Camp_Period2_Lookup. But as the Camp_Period_Lookup and Camp_Period2_Lookup has the same values, I do not want the user to select the second but instead I want to sync the Camp_Period2_Lookup with the value of Camp_Period_Lookup. This is where I need your advice!PS! The lookup fields are static! 

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right