Skip to content

Instantly share code, notes, and snippets.

@WietseWind
Created July 27, 2016 19:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WietseWind/b27e9a4f3c880cda07f1242cd4921278 to your computer and use it in GitHub Desktop.
Save WietseWind/b27e9a4f3c880cda07f1242cd4921278 to your computer and use it in GitHub Desktop.
Sending SMS with Clockwork using nodum
<h1>SMS versturen</h1>
<p>Vul het onderstaande formulier in om een SMS te verzenden</p>
{% if param.postAll() %}
{% set sms = api.Clockwork_sms(param.postRaw('from'),param.postRaw('to'),param.postRaw('message')) %}
{% if sms.sent %}
<p class="alert alert-groen">
Verzonden!
</p>
{% else %}
<p class="alert alert-rood">
Verzendfout: {{ sms.getError }}
</p>
{% endif %}
{% else %}
<form action="{{ index }}" method="post" role="form">
<div class="form-group">
<label for="from">Afzender</label><input type="text" class="form-control" id="from" name="from" placeholder="..." value="iPub">
</div>
<div class="form-group">
<label for="to">Ontvanger</label><input type="text" class="form-control" id="to" name="to" placeholder="+31..." value="">
</div>
<div class="form-group">
<label for="message">Bericht</label><input type="text" class="form-control" id="message" name="message" placeholder="..." value="Groetjes!">
</div>
<!-- Submit button -->
<button type="submit" class="btn btn-groen"><i class="fa fa-send"></i> Verstuur</button>
</form>
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment