Skip to content

Changes Formidable Forms global login message to include a login link with redirect

License

Notifications You must be signed in to change notification settings

jvarn/formidable-custom-global-login-message

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Formidable Forms Global Login Message with Login Link and Redirect

This Wordpress plugin adds a login link with redirect to the Formidable Forms You don't have permission to view this form message.

It changes the global login message, which is displayed to logged out users when form permissions are set to "Logged in" and is set under Global Settings / Message Defaults.

The reason for using a function to modify this value rather than inserting a hyperlink directly into the settings is in order for the login link to include a redirect back to the user's pre-login location.

v1.0.0 A comment under source 2 below gave a good tip to replace get_permalink with some alternative code in order to keep any query vars in the URL. This is especially useful if the Formidable Form is inserted within the detail page of a Formidable View – for example in the format /PageWithView/ViewDetail/ID this might be /Staff/StaffDetail/25. Get Permalink would give us /Staff but omit the rest, whereas the suggested code, included in this plugin, will maintain the entire link.

v1.1.0 Now instead of replacing the entire string with a hard-coded value, it will add the link to the string specified in the settings. It will search for a word between two asterisks, e.g. You do not have permission to view this form, please *log in* to continue. and apply the link the that word.

This draws from documented features:

About

Changes Formidable Forms global login message to include a login link with redirect

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages