Support

Account

Home Forums Backend Issues (wp-admin) Get a value from two radio button fields and populate a third radio button field

Solving

Get a value from two radio button fields and populate a third radio button field

  • I have two radio button fields, let’s say Field 1 with 5 choices, and Field 2 with 5 choices.

    When a choice is selected in either Field 1 or Field 2, I need whatever choice that is to be duplicated in Field 3 that has all 10 choices (the same 5 from field 1 and 5 from field 2) when the post is updated/saved.

    I’ve researched a lot of different solutions for combining fields but nothing is working. Not sure if acf/load_value or acf/save_post is correct to use or what…help is appreciated, thank you!

  • If Field 3 is also a radio button field, how can it hold both values of Field 1 & 2? Are field 1 & 2’s values numerical and Field 3 is always supposed to be the sum of those two other fields?

  • Thanks for the response. The 10 choices and their values in field 3 are the same as the choices and values in field 1 and field 2. They’re just text values like “sighting” , “encounter” , “attack” and so on.

    The user would never see both field 1 and field 2 at the same time because one of the fields is hidden from a previous field selection. So , I’m really just needing to pull the value from the field that has a choice selected and populate field 3.

    I’ve found a solution to merge fields and achieve this with gravity forms on the fronted, but would love to figure out how to make this happen on the backend if our admins don’t use the frontend. (Using this for a post creation process)

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Get a value from two radio button fields and populate a third radio button field’ is closed to new replies.