Combine two dynamic fields, but render one

I have set up two custom fields in ACPT to create a link. One field to select a page, one field to enter a URL. The user has to choose which of the two to use.

How do I proceed to make it a working link? How can I combine the two fields to make it work?

what do you mean user has to choose depending on what? on what state or condition?

use conditions if you have any. create 2 button and add conditions if you want to show the user only one link.

or if you don’t have conditions make a simple interaction a switch or tab or selector so user can select it.

The user either selects a page to link to, or enters a URL. I want both fields in my link so either of them works.

I know it can be done with 2 elements and using conditions, but I was hoping not to work with conditions.