Try our conversational search powered by Generative AI!

Forms - inheriting from FormContainerBlock no webhooks

Vote:
 

Hello,

I know there are a few topics created on this issue already and we have successfully implemented a custom FormContainerBlock a few months ago.

I just noticed that WebHooks do not function for the CustomFormContainerBlock I created. They exist on the FormContainerBlock forms but not the forms that extend this class. The WebHooks appear to be added using reflection so I am unsure of a workaround to get these WebHooks added back for these forms.

Thanks!

#151284
Jul 13, 2016 19:19
Vote:
 

You might miss something when implement your custom Controller, not in the custom FormContainerBlock.

Default DataSubmitController has public virtual ActionResult Submit()

Submit() call _dataSubmissionService.Service.PerformDataSubmit(rawSubmittedData, HttpContext, this);

DataSubmissionService.PerformDataSubmit() call 

_actorsExecutingService.Service.ExecuteActors(isFinalized ? submissionDataFullForm : submissionData,
formContainer, formIdentity,
httpContext.Request, httpContext.Response, formSubmissionId, isFinalized);

_actorsExecutingService.Service.ExecuteActors() involke all registered Actors.

Thach lockevn.

#151383
Jul 19, 2016 13:18
Vote:
 

The custom FormContainerBlock does not have any options for any hooks when editing, not on submission. That might still pose an issue but right now the issue is only during the editor. Everything just simply extends the default form code and no customization or alterations are done besides overriding default properties. No default or custom hooks appear for the custom form blocks. They appear for default form blocks. 

See screenshots below comparing custom form block versus default form block. 

http://imgur.com/a/wPRlr

I have extended: FormContainerBlock, FormContainerBlockController

#151391
Edited, Jul 19, 2016 17:09
Vote:
 

Hi Matt,

Sorry for late coming back to this issue.

Does your custom FormContainerBlock inherit from default FormContainerBlock?

If yes, we will file a bug for this and introduce a fix in next release. Could you please, send me your custom project (just about the custom FCBlock) to my email ngocthach.nguyen@youKnowMyCompanyName.com?

Thank you.

T.

#151907
Aug 10, 2016 9:57
Vote:
 

Could I check if this got filed as a bug to be worked on please?  As believe I've encountered exactly the same issue.  Wanted to add an additional property and set default values to FormContainerBlock and so created a new one like this:

    using System.ComponentModel.DataAnnotations;
    using EPiServer.Core;
    using EPiServer.DataAbstraction;
    using EPiServer.DataAnnotations;
    using EPiServer.Forms.Implementation.Elements;
    using EPiServer.Web;
    using Girlguiding.Web.Constants;
    using Girlguiding.Web.Infrastructure.Settings;

    /// <summary>
    /// Defines the Form Container With Confirmation Email Block
    /// </summary>
    [ContentType(
        DisplayName = "Form Container Block",
        GUID = "2F2D77CA-C819-4D40-8BB2-AD62C36271B1",
        Description = "A block for rendering an editable form, with support for a confirmation email",
        GroupName = "Forms",
        Order = 110)]
    [ImageUrl("/EPiServer/EPiServer.Forms.UI/3.0.0.0/ClientResources/epi-forms/themes/sleek/images/contenttypes/formcontainerblock.png")]
    public class FormContainerWithConfirmationEmailBlock : FormContainerBlock, IHasConfirmationEmail
    {
        [Display(
            Name = "Tick to send a confirmation message to the user following sign-up",
            Order = 40)]
        public virtual bool SendConfirmationEmail { get; set; }

        [Display(
            Name = "Confirmation email subject",
            GroupName = ContentGroupNames.Content,
            Order = 45)]
        [StringLength(200)]
        public virtual string ConfirmationEmailSubject { get; set; }

        [Display(
            Name = "Confirmation email copy",
            Order = 50)]
        [PropertySettings(typeof(BasicTinyMceSettings))]
        public virtual XhtmlString ConfirmationEmailCopy { get; set; }

        public override void SetDefaultValues(ContentType contentType)
        {
            base.SetDefaultValues(contentType);
            AllowAnonymousSubmission = true;
        }
    }

But as shown in the screen grabs from Matt S, when editing an instance of this block, the options to "Send email after submission" and "Trigger webhook after form submission" don't appear.  They do if I use the provided FormContainerBlock.

Thanks

Andy

#154868
Edited, Aug 31, 2016 17:10
Vote:
 

AFORM-795 is filed and fixed. This will be in next release (soon, this week or next week). Thank you.

#154979
Sep 06, 2016 13:28
Vote:
 

Hi Matt and Andy?

Does Forms 3.1 fix your problem?

#157796
Sep 22, 2016 12:34
Vote:
 

Will be checking it out - should be upgrading this particular solution in the upcoming weeks and will update here when we do.

Andy

#157799
Sep 22, 2016 12:55
Vote:
 

I expect someone tell me is it fixed in Forms 3.1 and resolve this thread. Thank you.

#163197
Oct 20, 2016 9:46
Vote:
 

I'm using forms 3.1 and still have this issue.

#170713
Oct 27, 2016 8:27
Vote:
 

Hmm, we will recheck the bug AFORM-795, sound strange.

#170715
Oct 27, 2016 8:48
Vote:
 

I am really sorry for this case, I rechecked and we did not fix/verify this bug completely. This will be in next release.

#170740
Oct 28, 2016 8:57
Vote:
 

I hope the release EPiServer.Forms 4.2.1 fix this problem. Sorry for the delay.

#173266
Dec 19, 2016 4:18
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.