Jump to content

Multiple Address Boxes


pbrown

Recommended Posts

I have this rule below that allows for two address boxes. If one address is filled in then the single address box shows and if two addresses are filled then two boxes show but the single does not. What I need is to be able to add a third address option. Any ideas on how to add that to the existing rule?

 

The following rule will check two fields:

- Address

- Address2

 

If EITHER of these fields are blank, then that means the user only entered ONE address and therefore, it should appear in the SINGLE text box. Therefore, you would place this rule in the SINGLE text box:

 

========================

// SingleAddressRule

 

if (Field("Address") == "" || Field("Address2") == "")

return Field("Address") + Field("Address2");

else

return "";

========================

 

 

You would have to duplicate this rule and make one for the City, State, Zip, and Phone Number

 

 

 

 

 

 

 

NEXT, you place the following rule in the left-hand DOUBLE text box:

 

========================

// Address1Rule

 

if (Field("Address") == "" || Field("Address2") == "")

return "";

else

return Field("Address");

========================

 

Again, you would duplicate this rule for City, State, Zip, and Phone

 

 

Here is the rule for the RIGHT-HAND double text box

========================

// Address2Rule

 

if (Field("Address") == "" || Field("Address2") == "")

return "";

else

return Field("Address2");

========================

 

Again, you would duplicate each rule for City2, State2, Zip2, and Phone2

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...