PHP Classes

File: view/melis-cms-prospects/plugins/prospects-form.phtml

Recommend this page to a friend!
  Classes of Fabrice Fesch   Melis CMS Prospects   view/melis-cms-prospects/plugins/prospects-form.phtml   Download  
File: view/melis-cms-prospects/plugins/prospects-form.phtml
Role: Example script
Content type: text/plain
Description: Example script
Class: Melis CMS Prospects
Melis CMS module to track business prospects
Author: By
Last change:
Date: 2 years ago
Size: 1,640 bytes
 

Contents

Class file image Download
<style>
.default-form-err-msg-plugin li{
    display: inherit;
}
</style>

<?php if ($this->renderMode == 'front' || $this->previewMode == true) {?>
<div class="<?php echo "$this->widthDesktop $this->widthTablet $this->widthMobile" ?>" >
    <?php } else {?>
<div class="">
        <?php }?>
<?php
                $form
= $this->prospectsForm;
               
$form->prepare();
           
?>

            <?php if ($this->success){?>
<div class="alert alert-success" role="alert">
                    <strong>Success!</strong> Your message has been sent to us.
                </div>
            <?php }elseif(!empty($this->errors)){?>
<div class="alert alert-danger" role="alert">
                    <strong>Error!</strong> There was an error sending your message.
                </div>
            <?php }?>
<?php

               
echo $this->form()->openTag($form);
                foreach (
$form->getElements() As $key => $val)
                {
                    echo
'<div class="form-group">';
                        echo
$this->formLabel($val);
                        echo
$this->formElement($val);
                        echo
$this->formElementErrors($val, array('class' => 'default-form-err-msg-plugin text-danger'));
                    echo
'</div>';
                }
           
?>
<button type="submit" class="btn btn-default cms-prospect-submit-btn"><?= $this->translate('tr_MelisCmsProspectsShowFormPlugin_form_submit_button'); ?></button>
            <?php
               
echo $this->form()->closeTag();
           
?>
</div>
</div>