Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to define landing page when form is submitted successfully #287

Open
wants to merge 1 commit into
base: 2.5
Choose a base branch
from

Conversation

eekes
Copy link
Contributor

@eekes eekes commented May 4, 2021

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Related issues/PRs #44
License MIT

What's in this PR?

Add the ability to define a custom landing page after a form was submitted successfully.

This is my first PR for a feature like this, so I'm not sure if I'm on the right track or whether this should be handled completely differently, so feel free to tear this down if needed... 😄

To Do

  • Create documentation
  • Also provide a field to add a custom querystring to the landing page URL
  • Tests (?)

@alexander-schranz
Copy link
Member

alexander-schranz commented May 4, 2021

@eekes Thank you for the PR. I'm not really sure if we want to implment the target on the Form Entity, I did think in the past about it and I think it better would be that it can be defined per page as form can be used on different pages and could have different target pages. But we would need to discuss this first in the core team before we can create a decision what would be best to implement this feature.

@eekes
Copy link
Contributor Author

eekes commented May 4, 2021

@alexander-schranz I hadn't thought about that but you're right, it would be better to be able to define this from wherever you select the form...

@alexander-schranz
Copy link
Member

alexander-schranz commented May 22, 2021

Could think about something like this by using a tag currently not sure if possible to implement it this way:

        <property name="form" type="single_form_selection">
            <meta>
                <title lang="de">Formular</title>
                <title lang="en">Form</title>
            </meta>

            <params>
                <param name="resourceKey" value="page"/>
            </params>
        </property>

        <property name="targetPage" type="link">
            <meta>
                <title lang="de">Zielseite</title>
                <title lang="en">Targetpage</title>
            </meta>
            
            <tag name="sulu_form.target" form="form" />
        </property>

Update: A new link content type was added which would possible to link to page, articles, external or other link providers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants