4

I am working on the following requirement:

A page on the website has a form for end users to submit. The first half of the form has fields that are common and the second half is a WFFM.

The content author can change this WFFM. They will create a template (which will always inherit another fixed template CommonWFFMTemplate), map its fields to the form's fields and in the save actions, choose "create item".

The developer will not be aware of what the WFFM fields are. The default WFFM submit button is hidden by CSS and the action is triggered by a custom button which submits an ajax post.

The submit function has to create the item and also update the common fields' values in the same item. I was able to achieve all of it like this - create the wffm item first, then get the item by "__created by" value as it will be context.user and then update its common field values.

But now the requirement is such that, a user can submit the data multiple times(earlier it was one submission per user). Retrieving the just created item is tricky now, because two users can login with the same ID and submit. Though rare, but still a possibility.

And I am unable to think of any way to move further.

  1. Tried to create a custom save action. When I add the custom save action to the wffm form and click on OK, it says "This action cannot be added. Your configuration does not support it.

  2. Is there a way without custom actions that I can - get the ItemID of the just created item or maybe I can save a unique ID in one of the common template fields, when the wffm form data gets saved.

using sc8.0 u5 with WFFM u4

1

The error

action cannot be added. Your configuration does not support it.

means that you have specified a namespace/class/dll that sitecore can't find.

Make sure you have the dll with your custom save action in the bin directory and the namespace is correct.

I wouldn't know any other clean way to get the just created item, so I strongly suggest to use the save action.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.