Thanks for the reply. If it were a checkbox instead of a link, I’m not even sure how I would do it. So maybe that would be a good starting point. I’m clueless with JavaScript but strong with Dynamic Forms and SQL.
My exact scenario is this: I am setting up a carpool registration form where there are a series of the exact same fields for each passenger. The user specifies up front that there are x number of passengers and then the appropriate fields are hidden or displayed using a question event. The users enters information for the first passenger and in most cases, the passengers will all have the same information for all of their employment-related fields because they work together 80% of the time.
So with that in mind, I’m trying to set it up so there is a link at the beginning of each passenger’s Employment Info section that says “copy Employment Info from previous passenger” and when its clicked, it will take all the values entered in the fields for the previous passenger (5 fields total – all textboxes) and duplicate the same values in the same fields for the new passenger so that they don’t have to retype it.
I know I could setup a checkbox that says "same info as above" adn then disable the appropriate fields using a question event when they click a checkbox to indicate its the same, but then if there is even a slight variation in 1 of the 5 fields such as (office phone number) then they wouldn’t be able to use it. So the method I’m describing above would be a similar concept to what Dynamic Forms does in the control panel when choose to add a new field and have the option to choose a field to copy from and then the defaults are all set. I understand what I am trying to do is different because I want to pull it from values that were entered only on the screen and not yet saved to the database. So my lack of JavaScript skills is preventing me from figuring this out.
If you could point me in the right direction of what this JavaScript would look like and where each part would go, that would be immensely helpful. Or if you say this would be an insane amount of JavaScript to write for the tradeoff of what I’m trying to implement then I just have to disable the fields on a question event. Maybe there’s even another way to use a question event to do this? The way I'm trying to accomplish it with a copy type function seems like the most user-friendly way to go in this scenario, so I'd rather not disable fields.