{{1+3}}
for_chars -{{edit?for_chars}}
load = {{load?load.html}}
load_test = {{load?load_test.html}}
load_test span = {{load?load_test.html span}}
include span = {{include?load.html&selector=span}}
include span = {{include?load.html}}
{{live?((query?leaders==signup_query?government_bc.mlas.leaders.*))}} {{live?((leaders.keys))}} Simple {{live?for?((leaders))&&do== [[id]] [[title]] [[first_name]] [[last_name]] [[email]]}} {{error_required=Required. Must not be blank.}} {{$.body.on.focusout.[required]=((if?(([[this]].val))(([[this]].html))&else=(([[this]].aria-errormessage={{error_required}}))))}} {{$.body.on.input.[required]=((if?(([[this]].val))(([[this]].html))&then=((if?(([[this]].aria-errormessage))&is={{error_required}}&then=(([[this]].aria-errormessage=))))))}} {{$.body.on.input.[aria-errormessage]=((if?(([[this]].val))(([[this]].html))&else=((evaluate?(([[this]].aria-errormessage=((if?(([[this]].aria-errormessage))&is={{error_required}}&then=&else={{error_required}}))))))))}} {{live?((thread_result))}} {{thread?thread_result=Thread result = ((for?i=1,2,4,5,6&do=[[i]])) It works!! }}
{{live?((thread_result_2))}}
{{call_thread=((thread?thread_result_2=Thread result = ((for?i=((1..10000))&last=[[i]]))))}} {{live?((edit?call_thread))}}
{{live?((call_thread?))}}
{{query?location=https://ipinfo.io/json}} location.city = {{live?((location.city))}}
{{query_id=rep1}} {{postal_code=V3K3L8}} {{query_representives=((query?[[id]]==https://represent.opennorth.ca/postcodes/[[postal_code]]/?limit=200))}}

{{live?((edit?postal_code))}}

{{$.postal_code.placeholder=Postal Code *}} {{live?(($.postal_code.placeholder=Postal Code *))}} {{live?((evaluate?((city=((rep1.city))))))}} {{live?((evaluate?((query_representives?postal_code==((validated_postal_code))&&id=={{query_id}}))))}} {{salutation=Dear}}{{live?((edit?salutation))}} {{live?(($.salutation.placeholder=Salutation *))}}{{live?(($.salutation.attr.tabindex=-1))}} {{representative_name=((for?((rep1.representatives_centroid))&&default==Your MP&&do==((if?[[elected_office]]&in=[[p]]&then= [[elected_office]] [[last_name]]))))}} {{names_list2=((representative_name?MP)), ((representative_name?MLA,MPP)) and ((representative_name?Mayor))}} {{live?((evaluate?((the_names={{names_list2}}))((the_names))))}}

{{subject=}}{{live?((edit?subject))}}{{live?(($.subject.placeholder=Subject *))}} {{live?(($.subject.css.font-weight=bold))}} {{live?(($.subject.attr.required=true))}}

{{message=}}{{live?((edit?message))}}{{live?((evaluate?(($.message.placeholder=Your message to ((the_names)) *))))}}

{{closing=Yours Truly}}{{live?((edit?closing))}} {{live?(($.closing.placeholder=Closing *))}}{{live?(($.closing.attr.tabindex=-1))}}

{{first_name=}}{{live?((edit?first_name))}} {{live?(($.first_name.placeholder=First Name *))}} {{last_name=}}{{live?((edit?last_name))}} {{live?(($.last_name.placeholder=Last Name *))}}
{{email=}}{{live?((edit?email))}} {{live?(($.email.placeholder=Email *))}} {{live?(($.email.attr.name=email))}} {{live?(($.email.attr.autocomplete=on))}}
{{live?((edit?city))}}{{live?(($.city.tabindex=-1))}} {{province=}} {{live?((evaluate?((province=((rep1.province))))))}} {{live?((edit?province))}} {{live?(($.province.placeholder=Province *))}} {{live?(($.province.tabindex=-1))}}
{{pc_first=A,B,C,E,G,H,J,K,L,N,P,R,S,T,V,X,Y}} {{pc_letter=A,B,C,E,G,H,J,K,L,M,N,P,R,S,T,V,W,X,Y,Z}} {{pc_number=0,1,2,3,4,5,6,7,8,9}} {{pc_validate_maker_item_start=((if?[[c]]}} {{pc_validate_maker_end=))}} {{delay_open=((}} {{delay_close=))}} {{param_open=[[}} {{param_close=]]}} {{pc_validate_maker_start=((for_chars?c==[[p]]&&do==}}
{{validation_maker=((pc_validate_maker_start))((delay_open))switch?[[for.index]]((for?x==[[p]]&&do==&[[for.index]]=((delay_open))if?[[c]]&out=(([[x]]))&then=Char (([[for.index]]+1)) must be (([[x]])). ((delay_close))))&default=Too long. ((delay_close))((delay_close))}}
{{pc_validate={{validation_maker?pc_first,0..9,pc_letter,0..9,pc_letter,0..9}}}}
{{pc_validateold=((for_chars?c=[[p]]&do=((switch?[[for.index]]&0=((if?[[c]]&out=(([[0]]))&then=1st char must be {{pc_first}}))&1=((evaluate?((if?((char_is_number?[[c]]))&else=2nd char not number.))))&6=Too long ))&last=((if?[[for.index]]&less_than=5&then=Must be 6 chars))))}} {{char_is_number=((if?[[p]]&in={{0..9}}&then=[[p]]&else=))}} {{postal_code_validate=((for_chars?c=[[p]]&do=((switch?[[for.index]]&0=((if?[[c]]&out={{pc_first}}&then=1st char must be {{pc_first}}))&1=((evaluate?((if?((char_is_number?[[c]]))&else=2nd char not number.))))&6=Too long ))&last=((if?[[for.index]]&less_than=5&then=Must be 6 chars))))}} {{live?((for_chars?c=((postal_code))&do=((switch?[[for.index]]&0=((if?[[c]]&out={{pc_first}}&then=1st char must be {{pc_first}}))&1=((evaluate?((if?((char_is_number?[[c]]))&else=2nd char not number.))))&6=Too long ))&last=((if?[[for.index]]&less_than=5&then=Must be 6 chars))))}} {{live?((edit?postal_code))}} {{live?((evaluate?((validated_postal_code=((replace?((upper?((postal_code))))&target= &all=true))))))}} {{live?((edit?validated_postal_code))}} {{live?((evaluate?(($.postal_code.aria-errormessage=((pc_validate?((validated_postal_code))))))))}}


{{live?((edit?feedback[submitted_address]))}}
{{live?((edit?submitted_address))}}
{{live?((edit?scales))}}
{{live?((edit?vehicle1))}}
{{live?((edit?vehicle2))}}
{{live?((edit?vehicle3))}}



{{live?((edit?gender))}}

{{live?((edit?cars))}}
{{live?((the_reps))}} {{live?((thread?the_reps=((for?r==((rep1.representatives_centroid))&&do== ((city))[[name]] [[email]] ((for?[[offices]]&do=[[type]] [[tel]]))
))))}} {{query_results?id=={{query_id}}&&array_path==representatives_centroid&&default==Your MP&&item_template==((if?[[elected_office]]&is=MP&then=MP [[last_name]]))}}, {{query_results?id=={{query_id}}&&array_path==representatives_centroid&&default==Your MLA&&item_template==((if?[[elected_office]]&is=MLA&then=MLA [[last_name]]))}} and {{query_results?id=={{query_id}}&&array_path==representatives_centroid&&default==Your Mayor&&item_template==((if?[[elected_office]]&is=Mayor&then=Mayor [[last_name]]))}} {{representative_name_old=((query_results?id=={{query_id}}&&array_path==representatives_centroid&&default==Your MP&&item_template==((if?[[elected_office]]&in=[[p]]&then= [[elected_office]] [[last_name]]))))}} {{live?((for?rep1.representatives_centroid&&do==((if?[[elected_office]]&is=Mayor&then=Mayor [[last_name]]))))}} {{representative_name_2=((live?((for?rep1.representatives_centroid&&default==Your MP&&do==((if?[[elected_office]]&in=[[p]]&then= [[elected_office]] [[last_name]]))))))}} {{names_list={{representative_name?MP}}, {{representative_name?MLA,MPP}} and {{representative_name?Mayor}}}} {{names_list}}