Crow Canyon Software Forum

Forum Navigation
Please or Register to create posts and topics.

Custom action to populate field1 with value from field2

So on this form I have 2 fields Postal Address and Physical address.
The idea is that the user will fill out the first address field and if the other address field is the same they will click the "same as postal" custom action and the physical address field will be populated with the value from postal address field.
I have this working... my question is around the placement of the custom action button on the form.
Obviously having this on the display form or the edit control block makes no sense.
Ideally I'd like to show this button on the new and edit forms in the place where I have dragged it onto the form designer.

The only option I have checked for "show in" is the default "Nitro forms" option.
The action button does not display anywhere in Chrome or Edge. I have treble checked that I have clicked apply/save/publish and even opened an 'in private' window to take cache out of the equation

Hi Jay, you want to populate Physical Address field with the value from the Postal Address field when the user checks a box that says "Same As Postal". This is better done with the "On Column Value Change Event" that is in NITRO Forms Designer.

In the Forms Designer, you highlight the "Same As Postal" checkbox on the form, then in the right-hand pane is "Column Settings". One of the options under that is "On Column Value Change Event". In that, you click Add, which opens the "Configure Form Event Action" screen.  One of the Actions under "New Actions" is "Update Form Controls". Choose that one. In "Configure Update Form Controls", you add a New Mapping. On the Column Value Mapping screen, you would choose Postal Address for the Column at the top, then for the Value, put in something like  [Physical Address|PhysicalAddress]. The exact verbiage there depends on the precise name of this field, as follows: [column display name|column internal name]. One other step is that in the Configuration screen for that Action, you  would want to put a Condition on this Action such that it only runs when "Same As Postal" = True.

You then press Ok several times to get out, then Apply once back in the Forms Designer main screen. You can then test it in Preview mode and Publish it if satisfied with the way it is working.

That will map the Postal Address to Physical Address when the user checks the Same As Postal checkbox. That is, the user would put in the Postal Address, then check the box, then it would write to the Physical Address column. Note that this Action runs when the box is checked (On Column Value Change). If you want the user to check the box first, then enter the Postal Address, the On Column Value Change would be the change in the value of the Postal Address and you can set it up to do that as well (with a Condition that it only runs if the Same As Postal is checked).

If you need more details than this, let us know.

 

That is awesome! thanks. Works perfectly

James Restivo has reacted to this post.
James Restivo