【问题标题】:how to add addtional buttons by using sitecore webform for marketer如何使用 sitecore 网络表单为营销人员添加其他按钮
【发布时间】:2014-09-01 18:02:31
【问题描述】:

当我使用 sitecore webform for marketer 模块在 sitecore 中创建新表单时。表单已经有一个默认提交按钮,但我想添加另一个按钮,例如清除表单功能。

如何在表单设计后端添加新按钮?

谢谢。

【问题讨论】:

    标签: sitecore web-forms-for-marketers


    【解决方案1】:

    我不相信有添加清除按钮的内置方法,但您应该参考 SDN 上的 WFFM User Guide(PDF 链接)了解如何使用表单生成器用于添加字段和按钮/操作的 GUI。

    【讨论】:

      【解决方案2】:

      没有添加清除按钮的内置方法,但您可以通过 jquery 自定义:

      1.添加一个子布局(ascx)页面,然后进行以下操作

         <div class="myDiv sub">
                                  <sc:Placeholder ID="phForm" runat="server" Key="Form" />
                                  <asp:HiddenField runat="server" ID="hfCancelButtonText" ClientIDMode="Static" /> 
                                  <div class="clear"></div>
          </div>
      

      然后在 jquery 中执行以下操作

      //adding reset-button in web-forms
      if ($('.scfForm .scfSubmitButtonBorder').length > 0) {
          $('.myDiv .scfForm .scfSubmitButtonBorder').prepend('<input type="Reset" class="reset-button" />');
      }
      
      //adding reset-button text in My-Account web-form
      var $hfCancelButtonText = $('.myDiv').find('#hfCancelButtonText').val();
      $('.my-account-detail').find('.reset-button').val($hfCancelButtonText);
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2012-01-25
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多