Display an edit link instead of the form
This feature is part of the Visforms Subscription and not available in the free Visforms version..
If a user has already submitted the form, they should not be able to submit the form for a second time, but edit there own data instead. This is a usecase which has be requested several times and which could not be realised on previous versions. Now there is a new option available in the form configuration "Display edit link instead of form". Although this seems to be quiet a simple option, there is a list of conditions which have to be met, in order for this feature to work as expected. If you want to use this feature, please read the following article carefully. If only one of the conditions listed below is not met, the form will be displayed and not the link and you may end up with more then one submission by a single user!
Set it up
- Enable the new form option "Display edit link instead of form" (Form configuration tab "Basic").
- Enable the form option "Save Result" (Form configuration tab "Result").
- Only submissions made by a logged in user can be linked to the user afterwards. Set the proper access levels for the form and the menu item which you use to display the form in order to make sure that the form cannot be viewed and submitted by guest users.
- Visforms allows any display of a data edit view in frontend only if there is a menu item of type "Visforms >> Form data with edit link" for this form. It is not necessary to actually display the menu item by way of publishing the menu with a module (so it can be a hidden menu item), but the menu item itself has to be created and published. Create a menu item of type "Visforms >> Form data with edit link".
- If a user has no permission to publish data, which is quite usual for a user of the user group "registered", they can only view and edit published record sets. This is just the same as with the edit views for Joomla! articles in the frontend and nothing specific to Visforms. Most probably the best solution is to set the form option "autopublish data" to "yes". If, in addition, you set the form option "Allow Frontend Data View" to "no", then submitted user inputs are be well protected and will only be visible in the data edit views.
- Make sure that the user group, to which the user who submits the form belongs, has the permission to edit own data.
If all conditions listed above are met and a user has already submitted the form once, Visforms will display a short explaining text and a link to the edit view instead of the form. At the moment this text is "fix" - defined in the language files. If you want to change the text, you have to create an override for the language tag "COM_VISFORMS_REDIRECT_TO_EDIT_VIEW_TEXT" in the language manager. The link text can be overriden in the language manager using the language tag "COM_VISFORMS_EDIT_LINK_TEXT".