Pass FormEntry to OnFormSaved event - Ideas & Feature Requests - Ideas & Feature Requests - Progress Community
 Ideas & Feature Requests

Pass FormEntry to OnFormSaved event

  • Pass FormEntry to OnFormSaved event
  • I am inheriting from FormsControl and subscribing to FormSaved. Problem is that I do not have any info on what was submitted. I was even ready to go so far as to querying the database for it, but not even a FormEntry id is passed as an args to the FormSaved event. Say I want to send the form submission to another system (which is why I am subscribing at this event in the first place). Please pass the FormEntry or FormEntry Id to the args of OnFormSaved in Telerik.Sitefinity.Modules.Forms.Web.UI.FormsControl.ProcessForm. Thanks.
  • Hello Basem,

    You can get the submitted value from the FormControls properties. The FormControls contains a placeholder control which holds the form controls, so you can retrieve the submitted data


    Kind regards,
    Ivan Dimitrov
    the Telerik team
  • Thanks Ivan. Although I think it would be really elegant to pass the parsed input values to the OnFormSaved (instead of 'this.OnFormSaved(null)'), I was able to make use of the below property of FormsControl:
    "protected virtual List<IFormFieldControl><IFormFieldControl> FieldControls"

    I just have to cast it with "FieldControl" in the loop to get the "Value" property of the field control. I hope this helps someone. Thanks again for the guidance.
  • Thanks guys, works for me as well

    +1 vote for a more elegant way to get the data though