event_forms_template.html 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. <div class="join_submit_box">
  2. <form id="ff">
  3. <{foreach from=$forms item=form}>
  4. <{if $form.type == 'text'}>
  5. <div class="submit_cell"><input name="<{$form.name}>" type="text" class="input_style" placeholder="<{$form.name}>" ></div>
  6. <{/if}>
  7. <{if $form.type == 'textarea'}>
  8. <div class="submit_cell submit_cell_area"><p><textarea name="<{$form.name}>" class="input_textarea" placeholder="<{$form.name}>"></textarea></p></div>
  9. <{/if}>
  10. <{if $form.type == 'select'}>
  11. <select name="<{$form.name}>">
  12. <option value="">请选择<{$form.name}></option>
  13. <{foreach from=$form.options item=option}>
  14. <option value="<{$option}>"><{$option}></option>
  15. <{/foreach}>
  16. </select>
  17. <{/if}>
  18. <{/foreach}>
  19. <section class="button-wrapper">
  20. <a class="button" id="common_submit_btn">提交资料</a>
  21. </section>
  22. </form>
  23. </div>
  24. <script>
  25. $("select").on('change', function () {
  26. if ($(this).val() == '') {
  27. $(this).css({'color':'#999'});
  28. } else {
  29. $(this).css({'color':''});
  30. }
  31. });
  32. </script>