Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save flocondetoile/29a2fa00692c0dbcebbb1544c09fd65c to your computer and use it in GitHub Desktop.

Select an option

Save flocondetoile/29a2fa00692c0dbcebbb1544c09fd65c to your computer and use it in GitHub Desktop.
Custom form D7
<div class="contact-form">
<h3><?php print t('Or by email'); ?></h3>
<?php print '<form id="'.$form['#id'].'" accept-charset="UTF-8" method="'.$form['#method'].'" action="'.$form['#action'].'">'; ?>
<?php print render($form['form_id']); ?>
<?php print drupal_render($form['form_build_id']);?>
<?php print render($form['form_token']); ?>
<div class="clearfix">
<?php print drupal_render($form['gender']); ?>
</div>
<div class="contact-form-left">
<?php print drupal_render($form['name']); ?>
<?php print drupal_render($form['surname']); ?>
<?php print drupal_render($form['telephone']); ?>
<?php print drupal_render($form['email']); ?>
<span id="email-example" class="description invisible"><?php print t('Email required ( example : [email protected] )'); ?></span>
<?php print drupal_render($form['flight_number']); ?>
<?php print drupal_render($form['flight_date']); ?>
<?php print drupal_render($form['flying_blue']); ?>
<span id="flight-date" class="description invisible"><?php print t('Expected format : dd/mm/yyyy'); ?></span>
</div>
<div class="contact-form-right">
<?php print drupal_render($form['message']); ?>
<?php print drupal_render($form['case']); ?>
<span id="case-example" class="description invisible"><?php print t('Expected format: ECQ123'); ?></span>
<?php print drupal_render($form['upload']); ?>
<?php print drupal_render($form['captcha']); ?>
</div>
<div class="contact-form-submit">
<?php print drupal_render($form['submit']); ?>
</div>
<?php print drupal_render_children($form); ?>
<?php print '</form>'; ?>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment