定制 innomedio/sulu-form-landing-page-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

innomedio/sulu-form-landing-page-bundle

最新稳定版本:v3.0.1

Composer 安装命令:

composer require innomedio/sulu-form-landing-page-bundle

包简介

Define redirects in Sulu forms after a successful form submit.

README 文档

README

Since the Sulu core team is not sure yet about the best way to implement landing pages for forms we've created a simple workaround.

Installation

Install using composer:

composer require innomedio/sulu-form-landing-page-bundle

Add the bundle to config/bundles.php if it's not automatically added:

Innomedio\Sulu\FormLandingPageBundle\InnomedioSuluFormLandingPageBundle::class => ['all' => true],  

Usage

You can now define the redirect url for successfully submitted forms. You can also define a querystring that needs to be appended.

{{ form_start(content.testForm) }}
    <input type="hidden" name="_sulu_form_redirect" value="{{ sulu_content_load(content.landingPage).path }}" />
    <input type="hidden" name="_sulu_form_querystring" value="?utm=this&id=that" />
{{ form_end(content.testForm) }}

So now you could create a content block containing a single_page_selection and single_form_selection field to be able to dynamically handle form redirects.

There's also a helper template available:

{% include '@InnomedioSuluFormLandingPage/sulu_redirect_form.html.twig' with {
    form: content.testForm,
    redirect: sulu_content_load(content.landingPage).path,
    querystring: '?utm=this&id=that'
} %}

统计信息

  • 总下载量: 1.28k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-05-05