php js css php js css

Changes

Changes to Page: form

218782
Today 12:51am
Racelis, Irish
Modified page
218854
Today 1:12am
Nocos, John Robertson
Modified page
Php Source:
Id:
/membership/form/
/membership/form/
Title:
Form
Form
Content:
<forms:form id="membership_form" recordsubmissions="true" onsubmitredirect="/membership/success/?sale_id=[? $sale_id ?]" onsubmitemailsubject="[? 'New Member: ' + $_POST['contact_first_name'] + ' ' + $_POST['contact_last_name'] ?]" onsubmitemail="false" onsubmitserver="onFormSubmit($membership_form.getValuesForComponent())">
<ajax:event id="selected_product_ajaxevent" updateregions="selected_product_ajaxregion" />
<ajax:event id="payment_ajaxevent" updateregions="total_paymentmethod_ajaxregion" />

<div class="fieldset">
<h4>Membership Type</h4>
<logic:if test="!(\Framework\DOM\CurrentContext::getIsInEmail())" evaluateat="render">
<forms:row type="one_column" label="">
<forms:radiobuttongroup name="product_id" validations="mandatory">
<div class="template-productFlexContainer">
<data:repeater datasource="\Components\Commerce\Products::getAllForCategoryAndBrand(5, null)" as="product" dataorder="[? [['product_price_base', 'ASC']] ?]" datafilter="[? [['product_is_offline', '=', 0]] ?]">
<div class="template-productFlex">
<logic:variable as="isSelected" value="" />
<ajax:event id="productSelected_ajaxevent" updateregions="productSelected_ajaxregion" />
<ajax:region id="productSelected_ajaxregion">
<logic:variable as="isSelected" value="productSelected" />
</ajax:region>
<forms:radiobutton datacolumn="product_id" valuechecked="[? $product['product_id'] ?]" label="" validations="mandatory" onchangeajax="payment_ajaxevent, selected_product_ajaxevent, productSelected_ajaxevent">
<h3 style="margin-top: 0;">
<strong>[? ' $' + round(\Components\Commerce\Products::getColumn($product['product_id'],'product_price'), 2) ?]</strong>
</h3>
<p>[? $product['product_title'] ?]</p></forms:radiobutton>
</div>
</data:repeater>
</div>
</forms:radiobuttongroup>
</forms:row>
</logic:if>
<logic:else>
<forms:row label="Membership Type"><forms:editbox id="product_id" /></forms:row>
</logic:else>
</div>

<logic:if test="!(\Components\Customers\Contacts::currentIsLoggedIn())">
<div class="fieldset accent-bg">
<h4>Create an Account</h4>
<p>If you have an existing account, please login <a href="/community/login/">here</a>. Otherwise, create an account below.</p>
<templates:row>
<templates:column width="6">
<forms:row label="Email Address" type="one_column">
<forms:editbox id="contact_email" datacolumn="contact_email" validations="mandatory,email" transformations="tolower" />
</forms:row>
</templates:column>
<templates:column width="6">
<forms:row label="Password" type="one_column">
<forms:password datacolumn="contact_password" id="contact_password" validations="mandatory" />
</forms:row>
</templates:column>
</templates:row>
</div>

<div class="fieldset">
<h4>Personal Information</h4>
<templates:row>
<templates:column width="6">
<forms:row label="First Name" type="one_column">
<forms:editbox id="contact_first_name" datacolumn="contact_first_name" validations="mandatory" />
</forms:row>
</templates:column>
<templates:column width="6">
<forms:row label="Last Name" type="one_column">
<forms:editbox id="contact_last_name" datacolumn="contact_last_name" validations="mandatory" />
</forms:row>
</templates:column>
</templates:row>

<templates:row>
<templates:column width="12">
<forms:row label="Phone" type="one_column">
<forms:editbox id="contact_phone" datacolumn="contact_phone" validations="numeric" />
</forms:row>
</templates:column>
</templates:row>

<div class="custom-address">
<forms:address id="contact_address" validations="mandatory" rowtype="one_column" />
</div>
</div>
</logic:if>
<logic:else>
<forms:hidden id="contact_email" datacolumn="contact_email" />
<forms:hidden id="contact_first_name" datacolumn="contact_first_name" />
<forms:hidden id="contact_last_name" datacolumn="contact_last_name" />

<div class="fieldset">
<h4>Personal Information</h4>
<p>Click <a href="/community/profile/">here</a> to update your profile. Not you? Logout <a href="/community/logout/">here</a>.</p>

<templates:row>
<templates:column width="6">
<forms:row label="Email Address" type="one_column">
<input type="text" value="[? \Components\Customers\Contacts::currentEmail() ?]" readonly disabled style="text-transform: lowercase" />
</forms:row>
</templates:column>
<templates:column width="6">
<forms:row label="Full Name" type="one_column">
<input type="text" value="[? \Components\Customers\Contacts::currentFullName() ?]" readonly disabled />
</forms:row>
</templates:column>
</templates:row>

</div>

</logic:else>

<ajax:region id="selected_product_ajaxregion">
<!-- If selected is Couple -->
<logic:if test="$product_id.value == 389">
<div class="fieldset">
<h4>Partner's Information</h4>
<ajax:event id="counterContactDetails_ajaxevent" updateregions="counterContactDetails_ajaxregion" />
<ajax:region id="counterContactDetails_ajaxregion">
<div style="position: relative;">
<forms:row label="Additional Contacts qty" class="counter">
<forms:spinbox id="counterContactDetails" valuemin="1" valuemax="1" value="1" onchangeajax="counterContactDetails_ajaxevent" />
</forms:row>
<logic:if test="$counterContactDetails.value &gt; 0">
<data:repeater datasource="createCounter($counterContactDetails.value)" as="item">
<style>.counter { display: none; } </style>
<forms:form id="additional_contact_partner" datacolumn="additional_contact_partner">
<templates:row>
<templates:column width="6">
<forms:row type="one_column" label="First Name">
<forms:editbox id="ac_first_name_[? $item ?]" datacolumn="contact_first_name" validations="mandatory" />
</forms:row>
</templates:column>
<templates:column width="6">
<forms:row type="one_column" label="Last Name">
<forms:editbox id="ac_last_name_[? $item ?]" datacolumn="contact_last_name" validations="mandatory" />
</forms:row>
</templates:column>
</templates:row>
<forms:row type="one_column" label="E-mail Address">
<forms:editbox id="ac_email_[? $item ?]" datacolumn="contact_email" transformations="tolower" validations="mandatory,email" />
</forms:row>
</forms:form>
</data:repeater>
</logic:if>
</div>
</ajax:region>
</div>
</logic:if>
<!-- If family is selected -->
<logic:else test="$product_id.value == 308">
<div class="fieldset">
<h4>Additional Contact Information</h4>
<ajax:event id="counterContactDetails_ajaxevent" updateregions="counterContactDetails_ajaxregion" />
<ajax:region id="counterContactDetails_ajaxregion">
<div style="position: relative;">
<forms:row label="Additional Contacts qty" class="counter">
<forms:spinbox id="counterContactDetails" valuemin="1" valuemax="5" value="1" onchangeajax="counterContactDetails_ajaxevent" />
</forms:row>
<logic:if test="$counterContactDetails.value &gt; 0">
<data:repeater datasource="createCounter($counterContactDetails.value)" as="item">
<logic:if test="$counterContactDetails.getValue() == '5'">
<style>.counter .spinBoxUp { background-color: #ccc; pointer-events: none; } </style>
</logic:if>
<forms:form id="[? 'additional_contact_family_' + $item ?]" datacolumn="[? 'additional_contact_family_' + $item ?]">
<h5><strong>[? $item ?]. ADDITIONAL CONTACT INFORMATION</strong></h5>
<p>Add each of the additional member contacts below. Not including the main contact.</p>
<templates:row>
<templates:column width="6">
<forms:row type="one_column" label="First Name">
<forms:editbox id="ac_first_name_[? $item ?]" datacolumn="contact_first_name" validations="mandatory" />
</forms:row>
</templates:column>
<templates:column width="6">
<forms:row type="one_column" label="Last Name">
<forms:editbox id="ac_last_name_[? $item ?]" datacolumn="contact_last_name" validations="mandatory" />
</forms:row>
</templates:column>
</templates:row>
<templates:row>
<templates:column width="7">
<forms:row type="one_column" label="E-mail Address">
<forms:editbox id="ac_email_[? $item ?]" datacolumn="contact_email" transformations="tolower" validations="mandatory,email" />
</forms:row>
</templates:column>
<templates:column width="5">
<forms:row label="Relationship" type="one_column">
<forms:combobox id="relationship_type_combobox_[? $item ?]" validations="mandatory" showvalueoption="true" value="" datacolumn="relationship_type_id" datasource="getRelationshipTypes(\Components\Customers\Contacts::currentContactId(), $membership_form.getValuesForComponent())" as="relationship_type" datatitle="$relationship_type['relationship_type_title']" datavalue="$relationship_type['relationship_type_id']"/>
</forms:row>
</templates:column>
</templates:row>
<br />
<br />
</forms:form>
</data:repeater>
</logic:if>
</div>
</ajax:region>
</div>
</logic:else>
<!-- If selected is Student -->
<logic:else test="$product_id.getValue() == 31">
<div class="fieldset">
<h4>Student Membership</h4>
<blockquote>
<em>Available to high-school and/or full-time college students only. Photo of a valid Student ID is required.</em>
</blockquote>
<forms:row type="one_column" label="Student ID Photo"><forms:fileupload id="contact_student_id" validations="mandatory" /></forms:row>
</div>
</logic:else>

<!-- If selected is Concession -->
<logic:else test="$product_id.getValue() == 358">
<div class="fieldset">
<h4>Concession Membership</h4>
<blockquote>
<em>Insert details here</em>
</blockquote>
<forms:row type="one_column" label="Proof of concession member"><forms:fileupload id="contact_concession_id" validations="mandatory" /></forms:row>
</div>
</logic:else>
</ajax:region>
<ajax:region id="total_paymentmethod_ajaxregion">
<logic:if test="$product_id.value">
<div class="fieldset">
<h4>Payment</h4>
<!-- Payment -->
<logic:variable as="product" value="[? \Components\Commerce\Products::get($product_id.getValue()) ?]" />
<forms:row label="Amount:">
<h3 style="font-weight: 300 !important;">
[? ' $' + round(\Components\Commerce\Products::getColumn($product['product_id'],'product_price'), 2) ?]
</h3>
</forms:row>
<forms:paymentmethod productid="[? $product['product_id'] ?]" completecart="true" recurring="true" recurringamount="[? $product['recurring_sale_amount'] ?]" recurringinterval="[?? \Components\Commerce\RecurringSales::renderInterval($product) ??]" showpaymentformonzerovalue="true" />
</div>
</logic:if>
</ajax:region>
</forms:form>
<forms:form id="membership_form" recordsubmissions="true" onsubmitredirect="/membership/success/?sale_id=[? $sale_id ?]" onsubmitemailsubject="[? 'New Member: ' + $_POST['contact_first_name'] + ' ' + $_POST['contact_last_name'] ?]" onsubmitemail="false" onsubmitserver="onFormSubmit($membership_form.getValuesForComponent())">
<ajax:event id="selected_product_ajaxevent" updateregions="selected_product_ajaxregion" />
<ajax:event id="payment_ajaxevent" updateregions="total_paymentmethod_ajaxregion" />

<div class="fieldset">
<h4>Membership Type</h4>
<logic:if test="!(\Framework\DOM\CurrentContext::getIsInEmail())" evaluateat="render">
<forms:row type="one_column" label="">
<forms:radiobuttongroup name="product_id" validations="mandatory">
<div class="template-productFlexContainer">
<data:repeater datasource="\Components\Commerce\Products::getAllForCategoryAndBrand(5, null)" as="product" dataorder="[? [['product_price_base', 'ASC']] ?]" datafilter="[? [['product_is_offline', '=', 0]] ?]">
<div class="template-productFlex">
<logic:variable as="isSelected" value="" />
<ajax:event id="productSelected_ajaxevent" updateregions="productSelected_ajaxregion" />
<ajax:region id="productSelected_ajaxregion">
<logic:variable as="isSelected" value="productSelected" />
</ajax:region>
<forms:radiobutton datacolumn="product_id" valuechecked="[? $product['product_id'] ?]" label="" validations="mandatory" onchangeajax="payment_ajaxevent, selected_product_ajaxevent, productSelected_ajaxevent">
<h3 style="margin-top: 0;">
<strong>[? ' $' + round(\Components\Commerce\Products::getColumn($product['product_id'],'product_price'), 2) ?]</strong>
</h3>
<p>[? $product['product_title'] ?]</p></forms:radiobutton>
</div>
</data:repeater>
</div>
</forms:radiobuttongroup>
</forms:row>
</logic:if>
<logic:else>
<forms:row label="Membership Type"><forms:editbox id="product_id" /></forms:row>
</logic:else>
</div>

<logic:if test="!(\Components\Customers\Contacts::currentIsLoggedIn())">
<div class="fieldset accent-bg">
<h4>Create an Account</h4>
<p>If you have an existing account, please login <a href="/community/login/">here</a>. Otherwise, create an account below.</p>
<templates:row>
<templates:column width="6">
<forms:row label="Email Address" type="one_column">
<forms:editbox id="contact_email" datacolumn="contact_email" validations="mandatory,email" transformations="tolower" />
</forms:row>
</templates:column>
<templates:column width="6">
<forms:row label="Password" type="one_column">
<forms:password datacolumn="contact_password" id="contact_password" validations="mandatory" />
</forms:row>
</templates:column>
</templates:row>
</div>

<div class="fieldset">
<h4>Personal Information</h4>
<templates:row>
<templates:column width="6">
<forms:row label="First Name" type="one_column">
<forms:editbox id="contact_first_name" datacolumn="contact_first_name" validations="mandatory" />
</forms:row>
</templates:column>
<templates:column width="6">
<forms:row label="Last Name" type="one_column">
<forms:editbox id="contact_last_name" datacolumn="contact_last_name" validations="mandatory" />
</forms:row>
</templates:column>
</templates:row>

<templates:row>
<templates:column width="12">
<forms:row label="Phone" type="one_column">
<forms:editbox id="contact_phone" datacolumn="contact_phone" validations="numeric" />
</forms:row>
</templates:column>
</templates:row>

<div class="custom-address">
<forms:address id="contact_address" validations="mandatory" rowtype="one_column" />
</div>
</div>
</logic:if>
<logic:else>
<forms:hidden id="contact_email" datacolumn="contact_email" />
<forms:hidden id="contact_first_name" datacolumn="contact_first_name" />
<forms:hidden id="contact_last_name" datacolumn="contact_last_name" />

<div class="fieldset">
<h4>Personal Information</h4>
<p>Click <a href="/community/profile/">here</a> to update your profile. Not you? Logout <a href="/community/logout/">here</a>.</p>

<templates:row>
<templates:column width="6">
<forms:row label="Email Address" type="one_column">
<input type="text" value="[? \Components\Customers\Contacts::currentEmail() ?]" readonly disabled style="text-transform: lowercase" />
</forms:row>
</templates:column>
<templates:column width="6">
<forms:row label="Full Name" type="one_column">
<input type="text" value="[? \Components\Customers\Contacts::currentFullName() ?]" readonly disabled />
</forms:row>
</templates:column>
</templates:row>

</div>

</logic:else>

<ajax:region id="selected_product_ajaxregion">
<!-- If selected is Couple -->
<logic:if test="$product_id.value == 389">
<div class="fieldset">
<h4>Partner's Information</h4>
<ajax:event id="counterContactDetails_ajaxevent" updateregions="counterContactDetails_ajaxregion" />
<ajax:region id="counterContactDetails_ajaxregion">
<div style="position: relative;">
<forms:row label="Additional Contacts qty" class="counter">
<forms:spinbox id="counterContactDetails" valuemin="1" valuemax="1" value="1" onchangeajax="counterContactDetails_ajaxevent" />
</forms:row>
<logic:if test="$counterContactDetails.value &gt; 0">
<data:repeater datasource="createCounter($counterContactDetails.value)" as="item">
<style>.counter { display: none; } </style>
<forms:form id="additional_contact_partner" datacolumn="additional_contact_partner">
<templates:row>
<templates:column width="6">
<forms:row type="one_column" label="First Name">
<forms:editbox id="ac_first_name_[? $item ?]" datacolumn="contact_first_name" validations="mandatory" />
</forms:row>
</templates:column>
<templates:column width="6">
<forms:row type="one_column" label="Last Name">
<forms:editbox id="ac_last_name_[? $item ?]" datacolumn="contact_last_name" validations="mandatory" />
</forms:row>
</templates:column>
</templates:row>
<forms:row type="one_column" label="E-mail Address">
<forms:editbox id="ac_email_[? $item ?]" datacolumn="contact_email" transformations="tolower" validations="mandatory,email" />
</forms:row>
</forms:form>
</data:repeater>
</logic:if>
</div>
</ajax:region>
</div>
</logic:if>
<!-- If family is selected -->
<logic:else test="$product_id.value == 308">
<div class="fieldset">
<h4>Additional Contact Information</h4>
<ajax:event id="counterContactDetails_ajaxevent" updateregions="counterContactDetails_ajaxregion" />
<ajax:region id="counterContactDetails_ajaxregion">
<div style="position: relative;">
<forms:row label="Additional Contacts qty" class="counter">
<forms:spinbox id="counterContactDetails" valuemin="1" valuemax="5" value="1" onchangeajax="counterContactDetails_ajaxevent" />
</forms:row>
<logic:if test="$counterContactDetails.value &gt; 0">
<data:repeater datasource="createCounter($counterContactDetails.value)" as="item">
<logic:if test="$counterContactDetails.getValue() == '5'">
<style>.counter .spinBoxUp { background-color: #ccc; pointer-events: none; } </style>
</logic:if>
<forms:form id="[? 'additional_contact_family_' + $item ?]" datacolumn="[? 'additional_contact_family_' + $item ?]">
<h5><strong>[? $item ?]. ADDITIONAL CONTACT INFORMATION</strong></h5>
<p>Add each of the additional member contacts below. Not including the main contact.</p>
<templates:row>
<templates:column width="6">
<forms:row type="one_column" label="First Name">
<forms:editbox id="ac_first_name_[? $item ?]" datacolumn="contact_first_name" validations="mandatory" />
</forms:row>
</templates:column>
<templates:column width="6">
<forms:row type="one_column" label="Last Name">
<forms:editbox id="ac_last_name_[? $item ?]" datacolumn="contact_last_name" validations="mandatory" />
</forms:row>
</templates:column>
</templates:row>
<templates:row>
<templates:column width="7">
<forms:row type="one_column" label="E-mail Address">
<forms:editbox id="ac_email_[? $item ?]" datacolumn="contact_email" transformations="tolower" validations="mandatory,email" />
</forms:row>
</templates:column>
<templates:column width="5">
<forms:row label="Relationship" type="one_column">
<forms:combobox id="relationship_type_combobox_[? $item ?]" validations="mandatory" showvalueoption="true" value="" datacolumn="relationship_type_id" datasource="getRelationshipTypes(\Components\Customers\Contacts::currentContactId(), $membership_form.getValuesForComponent())" as="relationship_type" datatitle="$relationship_type['relationship_type_title']" datavalue="$relationship_type['relationship_type_id']"/>
</forms:row>
</templates:column>
</templates:row>
<br />
<br />
</forms:form>
</data:repeater>
</logic:if>
</div>
</ajax:region>
</div>
</logic:else>
<!-- If selected is Student -->
<logic:else test="$product_id.getValue() == 31">
<div class="fieldset">
<h4>Student Membership</h4>
<blockquote>
<em>Available to high-school and/or full-time college students only. Photo of a valid Student ID is required.</em>
</blockquote>
<forms:row type="one_column" label="Student ID Photo"><forms:fileupload id="contact_student_id" validations="mandatory" /></forms:row>
</div>
</logic:else>

<!-- If selected is Concession -->
<logic:else test="$product_id.getValue() == 358">
<div class="fieldset">
<h4>Concession Membership</h4>
<blockquote>
<em>Insert details here</em>
</blockquote>
<forms:row type="one_column" label="Proof of concession member"><forms:fileupload id="contact_concession_id" validations="mandatory" /></forms:row>
</div>
</logic:else>
</ajax:region>
<ajax:region id="total_paymentmethod_ajaxregion">
<logic:if test="$product_id.value">
<div class="fieldset">
<h4>Payment</h4>
<!-- Payment -->
<logic:variable as="product" value="[? \Components\Commerce\Products::get($product_id.getValue()) ?]" />
<forms:row label="Amount:">
<h3 style="font-weight: 300 !important;">
[? ' $' + round(\Components\Commerce\Products::getColumn($product['product_id'],'product_price'), 2) ?]
</h3>
</forms:row>
<forms:paymentmethod productid="[? $product['product_id'] ?]" completecart="true" recurring="true" recurringamount="[? $product['recurring_sale_amount'] ?]" recurringinterval="[?? \Components\Commerce\RecurringSales::renderInterval($product) ??]" showpaymentformonzerovalue="true" />
</div>
</logic:if>
</ajax:region>
</forms:form>
Content Additional:
{"togglable_footerCTA":null,"togglable_memberCTA":"on","togglable_testCTA":null,"togglable_newslettercta":null}
{"togglable_footerCTA":null,"togglable_memberCTA":"on","togglable_testCTA":null,"togglable_newslettercta":null}
Css:

															

														
Js:

document.addEventListener('DOMContentLoaded', function () {
// Select all radio inputs inside .template-productFlex
const productFlexBoxes = document.querySelectorAll('.template-productFlex');

productFlexBoxes.forEach(function (box) {
const radio = box.querySelector('input[type="radio"]');

if (radio) {
// Initial state on load
if (radio.checked) {
box.classList.add('selected');
}

// Listen for changes
radio.addEventListener('change', function () {
// Remove 'selected' from all .template-productFlex elements sharing the same name
const allRadios = document.querySelectorAll(`input[name="${radio.name}"]`);
allRadios.forEach(function (r) {
const parent = r.closest('.template-productFlex');
if (parent) {
parent.classList.remove('selected');
}
});

// Add 'selected' class to the current one
if (radio.checked) {
box.classList.add('selected');
}
});
}
});
});

document.addEventListener('DOMContentLoaded', function () {
// Select all radio inputs inside .template-productFlex
const productFlexBoxes = document.querySelectorAll('.template-productFlex');

productFlexBoxes.forEach(function (box) {
const radio = box.querySelector('input[type="radio"]');

if (radio) {
// Initial state on load
if (radio.checked) {
box.classList.add('selected');
}

// Listen for changes
radio.addEventListener('change', function () {
// Remove 'selected' from all .template-productFlex elements sharing the same name
const allRadios = document.querySelectorAll(`input[name="${radio.name}"]`);
allRadios.forEach(function (r) {
const parent = r.closest('.template-productFlex');
if (parent) {
parent.classList.remove('selected');
}
});

// Add 'selected' class to the current one
if (radio.checked) {
box.classList.add('selected');
}
});
}
});
});
Accept Child 404:
0
0
Search Title:

															

														
Search Title Prefix:

															

														
Search Description:

															

														
Search Keywords:

															

														
Search Noindex:
0
0
Search Nofollow:
0
0
Search Change Frequency:

															

														
Search Priority:
0.5
0.5
Search Canonical Override:

															

														
Is Offline:
0
0
Is Hidden In Navigation:
1
1
Is Hidden In Sitemap:
1
1
Security New:
0
0
Security Contact Mode:

															

														
Security Contact Squeeze Viewlimit:

															

														
Security Contact Require Login:

															

														
Security Contact Groups:

															

														
Security Condition Id:

															

														
Security Heading:

															

														
Security Description:

															

														
Other Fields:

															

														
Order:
0
0
Parent Id:
/membership/
/membership/
Contact Id:
0
0
Design Id:
0
0
Header Functions:

															

														
Header Category:

															

														
Is Domain:
0
0
Post Category Id:

															

														
Event Category: