You may find a need to combine the data from multiple form components. Consider the example below:
Remember you will need to reference the individual component Property Names, found on the API tab for each component. In the example above, each element of interest is named based on its label in camel case. So the First Name component has a property name of firstName, Last Name has a property name of lastName, and Middle Initial has a property name of middleInitial. When you expect to write more complex rules, it is recommended you give form components property names that will be easy to understand and remember. You will need to reference them regularly.
Name Concatenation Rule
var fullName = ''; if(data.firstName) fullName = data.firstName + ' '; if (data.middleInitial) fullName += data.middleInitial + ' '; if (data.lastName) fullName += data.lastName; value = fullName.trim();
Advanced Name Concatenation Rule
var fullName = (data.firstName ? data.firstName + ' ' : '') + (data.middleInitial ? data.middleInitial + ' ' : '') + (data.lastName || ''); value = fullName.trim();
The form example described is available for download here.