Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {* Customised Bootstrap Layout *}
- {$fb_form_header}
- {if $fb_form_done == 1}
- {* This first section is for displaying submission errors *}
- {if isset($fb_submission_error) && $fb_submission_error}
- {assign var=disableNMS value="true" scope="global"}
- <div class="alert alert-danger fade in">
- {$fb_submission_error}
- </div>
- {if isset($fb_show_submission_errors) && $fb_show_submission_errors}
- <ul>
- {foreach from=$fb_submission_error_list item=thisErr}
- <li>{$thisErr}</li>
- {/foreach}
- </ul>
- {/if}
- {/if}
- {else}
- {* this section is for displaying the form *}
- {* we start with validation errors *}
- {if isset($fb_form_has_validation_errors) && $fb_form_has_validation_errors}
- <div class="alert alert-danger fade in">
- <h4>
- <i class="fa fa-exclamation-triangle" aria-hidden="true"></i>
- Sorry, we couldn't send your message. There was a problem with your...
- </h4>
- <ul style="margin-left:50px;">
- {foreach from=$fb_form_validation_errors item=thisErr}
- <li>{$thisErr|replace:'Please enter a value for ':''|replace:'"':''}</li>
- {/foreach}
- </ul>
- </div>
- {/if}
- {if isset($captcha_error) && $captcha_error}
- <div class="alert alert-danger fade in">
- <h4>
- <i class="fa fa-exclamation-triangle" aria-hidden="true"></i>
- Sorry, we couldn't send your message. There was a problem with your...
- </h4>
- <ul style="margin-left:50px;">
- <li>{$captcha_error}</li>
- </ul>
- </div>
- {/if}
- {$fb_form_start|replace:'class="':'class="form-horizontal '}
- <div>{$fb_hidden}</div>
- {foreach from=$fields item=entry}
- {if $entry->display == 1}
- <div class="form-group">
- {strip}
- {if $entry->hide_name == 0}
- <div class="col-xs-4 text-right">
- <label class="control-label"
- {if $entry->multiple_parts != 1} for="{$entry->input_id}"{/if}>
- {$entry->name}
- {if $entry->required_symbol != ''}
- {$entry->required_symbol}
- {/if}
- {if $entry->valid == 0}
- <i class="fa fa-exclamation-triangle text-danger" aria-hidden="true"></i>
- {/if}
- </label>
- </div>
- {/if}
- <div class="{if $entry->hide_name != 0}col-xs-12{else}col-xs-8{/if}" >
- {if $entry->multiple_parts == 1}
- {section name=numloop loop=$entry->input}
- {if $entry->label_parts == 1}
- <!-- multi part input -->
- <div>{$entry->input[numloop]->input} {$entry->input[numloop]->name}</div>
- {else}
- <div class="col-xs-4 no-padding">
- {$entry->input[numloop]->input|replace:'class="':'class="form-control '}
- </div>
- {/if}
- {if isset($entry->input[numloop]->op) && $entry->input[numloop]->op}{$entry->input[numloop]->op}{/if}
- {/section}
- {else}
- {if $entry->type=="Check Box"}<div class="checkbox">{/if}
- {if $entry->smarty_eval == '1'}
- {eval var=$entry->input|replace:'name="':'class="form-control" name="'|replace:'cms_dropdown':'form-control'}
- {else}
- {$entry->input|replace:'name="':'class="form-control" name="'|replace:'cms_dropdown':'form-control'}
- {/if}
- {if $entry->type=="Check Box"}</div>{/if}
- {/if}
- {if $entry->helptext != ''}
- <a href="javascript:fbht('{$entry->field_helptext_id}')"><img src="modules/FormBuilder/images/info-small.gif" alt="Help" /></a>
- <span id="{$entry->field_helptext_id}" style="display:none" class="fbr_helptext">{$entry->helptext}</span>
- {/if}
- </div>
- {/strip}
- </div>
- {/if}
- {/foreach}
- {if isset($has_captcha) && $has_captcha == 1}
- <div class="col-xs-12 col-sm-8 pull-right start-hidden">
- <div class="form-group" >
- <div class="captcha center-block">
- {$graphic_captcha}{$title_captcha}
- {$input_captcha}
- </div>
- </div>
- </div>
- {/if}
- <div class="col-xs-12">
- <div class="btn-group btn-group-justified" role="group" aria-label="Submit Form">
- <div class="btn-group" role="group">
- <button type="reset" class="btn btn-lg btn-default hvr-sweep-to-left hover-spin-icon">
- {fa icon='fa-refresh'}
- Reset
- </button>
- </div>
- <div class="btn-group" role="group">
- <button type="submit" class="btn btn-lg btn-primary hvr-sweep-to-right hover-nudge-icon">
- Send
- {fa icon='fa-chevron-circle-right'}
- </button>
- </div>
- </div>
- </div>
- {$fb_form_end}
- {/if}
- {literal}
- <script type="text/javascript">
- function fbht(htid) {
- var fbhtc=document.getElementById(htid);
- if (fbhtc) {
- if (fbhtc.style.display == 'none') {
- fbhtc.style.display = 'inline';
- } else {
- fbhtc.style.display = 'none';
- }
- }
- }
- </script>
- {/literal}
- {$fb_form_footer}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement