Links zu Kontaktformular

This commit is contained in:
labcode-de 2018-03-20 21:18:03 +01:00
parent 8c48c41995
commit 04d0732a3c
No known key found for this signature in database
GPG Key ID: 9CDB093B80490C2F
3 changed files with 24 additions and 3 deletions

View File

@ -1,3 +1,22 @@
function getParameterByName(name, url) {
if (!url) url = window.location.href;
name = name.replace(/[\[\]]/g, "\\$&");
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\+/g, " "));
}
$(function () {
$('select').material_select();
const param_rcp = getParameterByName('rcp')
if(param_rcp !== "") {
const rcp_option = $('#recipient>option[value=' + param_rcp + ']');
if(rcp_option.length === 1) {
rcp_option.attr('selected', true);
$('#recipient_option_choose').removeAttr('selected');
$('select').material_select();
}
} else {
$('select').material_select();
}
})

View File

@ -13,8 +13,9 @@ permalink: '/kontakt/'
<form method="post" action="https://services.freifunk.labcode.de/ffrs-website/contact-form/handler.php" class="row">
<div class="row">
<div class="input-field col s12">
<select required name="recipient" class="validate">
<option value="" disabled selected>Bitte Empf&auml;nger ausw&auml;hlen</option>
<select required name="recipient" class="validate" id="recipient">
<option value="" disabled selected id="recipient_option_choose">Bitte Empf&auml;nger ausw&auml;hlen</option>
<option value="allgemein">Allgemein</option>
<option value="vorstand">Vorstand</option>
<option value="technik">Technik</option>
<option value="cmy_ak">Community Altenkirchen</option>

View File

@ -27,6 +27,7 @@ permalink: /mitmachen_unterstuetzen/
<br>
<a target="_blank" href='{{ "/assets/documents/mitmachen_unterstuetzen/antrag_foerdermitglied.pdf" | relative_url }}'>Antrag f&uuml;r ein F&ouml;rdermitglied</a>
</p>
<p>Wenn du noch Fragen hast schreib uns. <a href="{{ '/kontakt/?rcp=allgemein' | relative_url}}">Kontaktformular</a></p>
</section>
<section>
<h4>Spenden</h4>