Cannot change form submissions via FormItLoadSavedForm

I have an application form with Formit (MODX 3.1.1-pl). And I can retrieve all form submissions via FormItLoadSavedForm.

Changing a field and submitting the form I get a new form entry in the Formit list. It doesn’t change the existing form. I tried setting a hidden field for savedFormHashKey but the value is empty. Changed the hidden field to a text field and filled it with the hash value manually: every time there is a new form entry, never changed the existing form.

Is there a way to change the loaded form without getting a new one? Found nothing in the community or in the web.

Did you set the property “updateSavedForm”?

[[!FormIt?
    ...
    &updateSavedForm=`true`
]]

Yes, of course I set it!

[[!FormIt? 
  &preHooks=`FormItLoadSavedForm` 
  &hooks=`FormItSaveForm`
  &formEncrypt=`1`
  &updateSavedForm=`true` 
  &savedFormHashKeyField=`key` 
  &formName=`Bewerbung`
]]
<form action="[[~[[*id]]]]" method="post" class="form-default">
… …

How do you set the value of this field?
I think it should be the value of the column “hash” of the database table.

savedFormHashKeyField=key`
is the name of the GET parameter like described here: How to load a form using FormItLoadSavedForm

The call of the retrieved form itself is like this

I tested it and added a field “key” to the form like this:

<input type="hidden" name="key" value="[[!+fi.key]]">

This seems to work and the saved form gets updated.

2 Likes

Great, that was the missing information. Many thanks!

1 Like

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.