Language course html
Jump to navigation
Jump to search
Line 282: | Line 282: | ||
</div> | </div> | ||
+ | |||
<!--------------------------CONTACT (phone)--------------------------> | <!--------------------------CONTACT (phone)--------------------------> | ||
+ | |||
+ | |||
+ | <!--------------------------phone number--------------------------> | ||
<div class="ci_form_section"> | <div class="ci_form_section"> | ||
<span class="ci_form_section_label"> | <span class="ci_form_section_label"> | ||
− | + | Phone number | |
</span> | </span> | ||
− | <input class="ci_form_input" type=" | + | |
+ | <style> | ||
+ | .iti__flag {background-image: url("/w/ci_scripts/intl-tel-input/img/flags.png");} | ||
+ | |||
+ | @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { | ||
+ | .iti__flag {background-image: url("/w/ci_scripts/intl-tel-input/img/flags@2x.png");} | ||
+ | } | ||
+ | |||
+ | .iti { width: 100%; } | ||
+ | </style> | ||
+ | |||
+ | <input class="ci_form_input" type="tel" id="phone" style="width:100%"> | ||
+ | <input type="hidden" id="phone_input" name="Form language course[Contact phone]" style="width:100%"> | ||
+ | |||
<span class="ci_form_section_help"> | <span class="ci_form_section_help"> | ||
</span> | </span> | ||
+ | </div> | ||
− | |||
Line 352: | Line 369: | ||
$ci('.ci_form textarea').autosize(); | $ci('.ci_form textarea').autosize(); | ||
+ | |||
+ | var input = document.querySelector("#phone"); | ||
+ | |||
+ | var iti = window.intlTelInput(input, { | ||
+ | initialCountry: "</html>{{#ci_visitorIsoCode:}}<html>", | ||
+ | utilsScript: '/w/ci_scripts/intl-tel-input/js/utils.js', | ||
+ | nationalMode: false, | ||
+ | separateDialCode: true, | ||
+ | }); | ||
+ | |||
+ | var val_ = $ci('#phone_input').val(); | ||
+ | |||
+ | if(val_) { | ||
+ | iti.setNumber(val_); | ||
+ | } | ||
Line 360: | Line 392: | ||
// otherwise pageforms will not retrieve it! | // otherwise pageforms will not retrieve it! | ||
$ci('input').removeAttr('disabled'); | $ci('input').removeAttr('disabled'); | ||
+ | |||
+ | |||
+ | |||
+ | var number = iti.getNumber(intlTelInputUtils.numberFormat.E164); | ||
+ | |||
+ | if(number) { | ||
+ | $ci('#phone_input').val(number); | ||
+ | } | ||
+ | |||
+ | |||
+ | |||
return true; | return true; | ||
}); | }); |
Revision as of 11:17, 3 September 2020
This form is intended to create language courses of a given organization or to characterize as such whatever page of it (not containing already a form).
Once the key-data are created, insert the abstract of the course editing the page using the buttons "Edit" or "Edit source" in the top panel.
![]() | The form will be created in the current page (). If you want to create the form in a new page, go here. |