updateFormSaveDisallowed = (disallowed) => {
if (!!disallowed != !!formSaveDisallowed){
$db('shirah').write('form-save-disallowed', (formSaveDisallowed = !!disallowed)).then(() => loadData());
}
};
loadData = () => {
$db('shirah').read('form-fields').then((fields) => {
fields && Object.keys(fields).filter(key => !data[key]).forEach(key => (data[key] = (fields[key] || '')));
});
};
saveData = () => {
if (formSaveDisallowed){
return;
}
const blacklist = ['form_id', 'transaction_id', 'transaction_uid', 'price', 'schedule_url'];
let validData = {};
Object.keys(data).filter(key => (data[key] && !blacklist.includes(key))).forEach(key => (validData[key] = data[key]));
$db('shirah').write('form-fields', validData);
};
nextPage = () => {
if (!invalid && $rel.lt(page, pages)){
page += 1;
delta = 1;
saveData();
}
else if (!invalid){
saveData();
$component('submission-notice').enter(data);
}
}
data.name = '';
data.phone = '';
$db('shirah').read('form-save-disallowed').then((disallowed) => {
!(formSaveDisallowed = !!disallowed) && loadData();
});
const inputs = [...(this.parentElement.querySelectorAll('input, select, textarea') || [])];
$scope.page = ++pages;
$scope.isValid = () => (!$scope.isInvalid && !inputs.find(input => (!input.validity.valid || (input.hasAttribute('required') && !input.value))));
(page == $scope.page && !(true)) && (page += delta);
(page == $scope.page) && (invalid = !$scope.isValid());
$scope.isInvalid;
data;
Contact Information
What is your
email?
let input = this.nextElementSibling;
if (!$scope.entered){
$scope.entered = true;
input.setAttribute('x-model', '$scope.email');
$$class(input).remove('w-full');
$$class(input).add('flex-grow');
$$class(this.parentElement).add('flex', 'flex-row', 'justify-start', 'items-center');
let outerDiv = document.createElement('div');
outerDiv.style.padding = '0.25rem';
$$class(outerDiv).add('ml-2', 'bg-themed-4', 'loader');
outerDiv.setAttribute('x-show', '$scope.email_checking');
outerDiv.setAttribute('x-cloak', '');
let innerDiv = document.createElement('div');
innerDiv.style.width = '1rem';
innerDiv.style.height = '1rem';
$$class(innerDiv).add('bg-transparent');
outerDiv.appendChild(innerDiv);
this.parentElement.appendChild(outerDiv);
}
$static(data).email = '';
let email = $scope.email, checkpoint = ($locals.checkpoint ? ++$locals.checkpoint : ($locals.checkpoint = 1)), scope = $scope;
if (email && input.validity.valid){
$scope.email_checking = true;
$get(`/emails/${email}/${id}`, true).then((res) => {
if (checkpoint == $$locals(this).checkpoint){
scope.email_checking = false;
if (res.ok){
Object.entries(res.data || {}).forEach(([key, value]) => (data[key] = value));
data.email = email;
scope.isInvalid = false;
}
else{
scope.isInvalid = true;
$alert.notify({
type: 'error',
message: res.message,
toast: true,
});
$router.goto(res.url);
}
}
});
}
else{
$scope.email_checking = false;
}
const inputs = [...(this.parentElement.querySelectorAll('input, select, textarea') || [])];
$scope.page = ++pages;
$scope.isValid = () => (!$scope.isInvalid && !inputs.find(input => (!input.validity.valid || (input.hasAttribute('required') && !input.value))));
(page == $scope.page && !(true)) && (page += delta);
(page == $scope.page) && (invalid = !$scope.isValid());
$scope.isInvalid;
data;
Personal Information
Country of
citizenship?
Please select one
Afghanistan
Albania
Algeria
Andorra
Angola
Anguilla
Antigua and Barbuda
Argentina
Armenia
Australia
Austria
Azerbaijan
Bahamas
Bahrain
Bangladesh
Barbados
Belarus
Belgium
Belize
Benin
Bermuda
Bhutan
Bolivia
Bosnia and Herzegovina
Botswana
Brazil
Brunei Darussalam
Bulgaria
Burkina Faso
Burundi
Cambodia
Cameroon
Canada
Cape Verde
Cayman Islands
Central African Republic
Chad
Chile
China
Colombia
Comoros
Congo, Democratic Republic of the
Congo, Republic of the
Costa Rica
Croatia (Hrvatska)
Cuba
Cyprus
Czech Republic
Denmark
Djibouti
Dominica
Dominican Republic
Ecuador
Egypt
El Salvador
Equatorial Guinea
Eritrea
Estonia
Ethiopia
Faroe Islands
Fiji
Finland
France
French Guiana
French Polynesia
French Southern Territories
Gabon
Gambia
Georgia
Germany
Ghana
Greece
Greenland
Grenada
Guadeloupe
Guam
Guatemala
Guinea
Guinea-Bissau
Guyana
Haiti
Honduras
Hong Kong
Hungary
Iceland
India
Indonesia
Iran
Iraq
Ireland
Isle of Man
Israel
Italy
Ivory Coast
Jamaica
Japan
Jersey
Jordan
Kazakhstan
Kenya
Kiribati
Kosovo
Kuwait
Kyrgyzstan
Lao
Latvia
Lebanon
Lesotho
Liberia
Libyan Arab Jamahiriya
Liechtenstein
Lithuania
Luxembourg
Macedonia
Madagascar
Malawi
Malaysia
Maldives
Mali
Malta
Marshall Islands
Martinique
Mauritania
Mauritius
Mexico
Micronesia, Federated States of
Moldova, Republic of
Monaco
Mongolia
Montenegro
Montserrat
Morocco
Mozambique
Myanmar
Namibia
Nauru
Nepal
Netherlands
Netherlands Antilles
New Caledonia
New Zealand
Nicaragua
Niger
Nigeria
North Korea
Northern Mariana Islands
Norway
Oman
Pakistan
Palau
Palestine
Panama
Papua New Guinea
Paraguay
Peru
Philippines
Poland
Portugal
Puerto Rico
Qatar
Reunion
Romania
Russian Federation
Rwanda
Saint Kitts and Nevis
Saint Lucia
Saint Vincent and the Grenadines
Samoa
San Marino
Sao Tome and Principe
Saudi Arabia
Senegal
Serbia
Seychelles
Sierra Leone
Singapore
Slovakia
Slovenia
Solomon Islands
Somalia
South Africa
South Korea
Spain
Sri Lanka
St. Helena
St. Pierre and Miquelon
Sudan
Suriname
Svalbard and Jan Mayen Islands
Swaziland
Sweden
Switzerland
Syrian Arab Republic
Taiwan
Tajikistan
Tanzania
Thailand
Togo
Tokelau
Tonga
Trinidad and Tobago
Tunisia
Turkey
Turkmenistan
Tuvalu
Uganda
Ukraine
United Arab Emirates
United Kingdom
United States
United States minor outlying islands
Uruguay
Uzbekistan
Vanuatu
Venezuela
Vietnam
Virgin Islands (U.S.)
Wallis and Futuna Islands
Yemen
Zambia
Zimbabwe
const inputs = [...(this.parentElement.querySelectorAll('input, select, textarea') || [])];
$scope.page = ++pages;
$scope.isValid = () => (!$scope.isInvalid && !inputs.find(input => (!input.validity.valid || (input.hasAttribute('required') && !input.value))));
(page == $scope.page && !(true)) && (page += delta);
(page == $scope.page) && (invalid = !$scope.isValid());
$scope.isInvalid;
data;
Contact Information
Country of
residence?
Please select one
Afghanistan
Albania
Algeria
Andorra
Angola
Anguilla
Antigua and Barbuda
Argentina
Armenia
Australia
Austria
Azerbaijan
Bahamas
Bahrain
Bangladesh
Barbados
Belarus
Belgium
Belize
Benin
Bermuda
Bhutan
Bolivia
Bosnia and Herzegovina
Botswana
Brazil
Brunei Darussalam
Bulgaria
Burkina Faso
Burundi
Cambodia
Cameroon
Canada
Cape Verde
Cayman Islands
Central African Republic
Chad
Chile
China
Colombia
Comoros
Congo, Democratic Republic of the
Congo, Republic of the
Costa Rica
Croatia (Hrvatska)
Cuba
Cyprus
Czech Republic
Denmark
Djibouti
Dominica
Dominican Republic
Ecuador
Egypt
El Salvador
Equatorial Guinea
Eritrea
Estonia
Ethiopia
Faroe Islands
Fiji
Finland
France
French Guiana
French Polynesia
French Southern Territories
Gabon
Gambia
Georgia
Germany
Ghana
Greece
Greenland
Grenada
Guadeloupe
Guam
Guatemala
Guinea
Guinea-Bissau
Guyana
Haiti
Honduras
Hong Kong
Hungary
Iceland
India
Indonesia
Iran
Iraq
Ireland
Isle of Man
Israel
Italy
Ivory Coast
Jamaica
Japan
Jersey
Jordan
Kazakhstan
Kenya
Kiribati
Kosovo
Kuwait
Kyrgyzstan
Lao
Latvia
Lebanon
Lesotho
Liberia
Libyan Arab Jamahiriya
Liechtenstein
Lithuania
Luxembourg
Macedonia
Madagascar
Malawi
Malaysia
Maldives
Mali
Malta
Marshall Islands
Martinique
Mauritania
Mauritius
Mexico
Micronesia, Federated States of
Moldova, Republic of
Monaco
Mongolia
Montenegro
Montserrat
Morocco
Mozambique
Myanmar
Namibia
Nauru
Nepal
Netherlands
Netherlands Antilles
New Caledonia
New Zealand
Nicaragua
Niger
Nigeria
North Korea
Northern Mariana Islands
Norway
Oman
Pakistan
Palau
Palestine
Panama
Papua New Guinea
Paraguay
Peru
Philippines
Poland
Portugal
Puerto Rico
Qatar
Reunion
Romania
Russian Federation
Rwanda
Saint Kitts and Nevis
Saint Lucia
Saint Vincent and the Grenadines
Samoa
San Marino
Sao Tome and Principe
Saudi Arabia
Senegal
Serbia
Seychelles
Sierra Leone
Singapore
Slovakia
Slovenia
Solomon Islands
Somalia
South Africa
South Korea
Spain
Sri Lanka
St. Helena
St. Pierre and Miquelon
Sudan
Suriname
Svalbard and Jan Mayen Islands
Swaziland
Sweden
Switzerland
Syrian Arab Republic
Taiwan
Tajikistan
Tanzania
Thailand
Togo
Tokelau
Tonga
Trinidad and Tobago
Tunisia
Turkey
Turkmenistan
Tuvalu
Uganda
Ukraine
United Arab Emirates
United Kingdom
United States
United States minor outlying islands
Uruguay
Uzbekistan
Vanuatu
Venezuela
Vietnam
Virgin Islands (U.S.)
Wallis and Futuna Islands
Yemen
Zambia
Zimbabwe
const inputs = [...(this.parentElement.querySelectorAll('input, select, textarea') || [])];
$scope.page = ++pages;
$scope.isValid = () => (!$scope.isInvalid && !inputs.find(input => (!input.validity.valid || (input.hasAttribute('required') && !input.value))));
(page == $scope.page && !(true)) && (page += delta);
(page == $scope.page) && (invalid = !$scope.isValid());
$scope.isInvalid;
data;
Personal Information
What is your
gender?
Please select one
Female
Male
const inputs = [...(this.parentElement.querySelectorAll('input, select, textarea') || [])];
$scope.page = ++pages;
$scope.isValid = () => (!$scope.isInvalid && !inputs.find(input => (!input.validity.valid || (input.hasAttribute('required') && !input.value))));
(page == $scope.page && !(true)) && (page += delta);
(page == $scope.page) && (invalid = !$scope.isValid());
$scope.isInvalid;
data;
Education Profile
What is the level of your
education?
const unknownLevels = [
'Masters or Doctorate Degree',
'Bachelor Degree involving equivalent of at least 3 years full time studies',
];
educationLevelIsUnknown = () => {
return unknownLevels.includes(data.education_level);
};
Please select one
Masters or Doctorate Degree
Bachelor Degree involving equivalent of at least 3 years full time studies
3-year equivalent full time studies/training leading to diploma, trade cert, or apprenticeship
2-year equivalent full time studies/training leading to diploma
1-year equivalent full time studies/training leading to diploma
High School
Have you
completed
your education?
const inputs = [...(this.parentElement.querySelectorAll('input, select, textarea') || [])];
$scope.page = ++pages;
$scope.isValid = () => (!$scope.isInvalid && !inputs.find(input => (!input.validity.valid || (input.hasAttribute('required') && !input.value))));
(page == $scope.page && !(true)) && (page += delta);
(page == $scope.page) && (invalid = !$scope.isValid());
$scope.isInvalid;
data;
Additional Information
How did you
hear about us?
Please select one
Social Media
Advert Marketing
Website
Search Engine
Recommendation
Other
const inputs = [...(this.parentElement.querySelectorAll('input, select, textarea') || [])];
$scope.page = ++pages;
$scope.isValid = () => (!$scope.isInvalid && !inputs.find(input => (!input.validity.valid || (input.hasAttribute('required') && !input.value))));
(page == $scope.page && !(true)) && (page += delta);
(page == $scope.page) && (invalid = !$scope.isValid());
$scope.isInvalid;
data;
Additional Information
Leave any additional
comments
you have
Next
Previous
Data entered into this form {{ formSaveDisallowed ? 'are not' : 'are' }} being saved on this device.
Turn {{ formSaveDisallowed ? 'on' : 'off' }}