#LOCAL("ErrorItemNo",0) #WITH_ERROR(#FormError) #LOCAL("IsError", #GET("FormError_".#Attribute.Alias) ) #IF(#Attribute.Alias EQ "CountryID") #LOCAL("HasUS", 0)
{Country} #IF(#IsMandatory){MandatoryStar}#ENDIF
#IF(#HasUS)
{State} #IF(#GET("ShopRegistrationField.State." . #IsMandatoryName)){MandatoryStar}#ENDIF
#SNIPPET("INC-USStates", "Prefix,InputName", "IncAttribute", "State") #ENDIF #ENDLOCAL #ELSIF(#Attribute.Alias EQ "Gender")
{Gender} #IF(#IsMandatory){MandatoryStar}#ENDIF
{Male} {Female}
#ELSE
#LOCAL("ErrorValue", #FUNCTION("ERROR_VALUE", #GET(#Attribute.Alias), #GET("Customer.".#Attribute.Alias)))
#Attribute.NameOrAlias #IF(#IsMandatory){MandatoryStar}#ENDIF
#IF(#Attribute.Type EQ "String" OR #Attribute.Type EQ "LocalizedString" OR #Attribute.Type EQ "EMail")#IF(#Attribute.Length) #ELSE #ENDIF #ELSIF(#Attribute.Type EQ "Boolean")
#Attribute.Description
#ELSIF(#Attribute.Type EQ "PreDefString" OR #Attribute.Type EQ "PreDefLocalizedString" ) #ELSIF(#Attribute.Type EQ "Integer")#SET("ErrorValue", #FUNCTION("ERROR_VALUE", #GET(#Attribute.Alias), #ErrorValue[integer])) #ELSIF(#Attribute.Type EQ "Float")#SET("ErrorValue", #FUNCTION("ERROR_VALUE", #GET(#Attribute.Alias), #ErrorValue[float])) #ELSIF(#Attribute.Type EQ "Money")#LOCAL("CurrencyID", #Shop.CurrencyID)#SET("ErrorValue", #FUNCTION("ERROR_VALUE", #GET(#Attribute.Alias), #ErrorValue[money])) #ENDLOCAL #ELSIF(#Attribute.Type EQ "DateTime")#IF(NOT #FormError) #SET("ErrorValue", #ErrorValue[datetime])#ENDIF #ELSIF(#Attribute.Type EQ "Time")#IF(NOT #FormError) #SET("ErrorValue", #ErrorValue[time])#ENDIF #ELSIF(#Attribute.Type EQ "Date")#IF(NOT #FormError) #SET("ErrorValue", #ErrorValue[date])#ENDIF #ENDIF #IF(#DEFINED(#Attribute.Description) AND #Attribute.Description AND #Attribute.Type NE "Boolean") #ENDIF
#ENDLOCAL
#ENDIF #ENDLOCAL #ENDWITH_ERROR #ENDLOCAL