• Not Answered

WFFM MVC 2.4 rev 151103 Custom Field View not taken

Hello,

I've follow the blog at https://jammykam.wordpress.com/2017/10/04/wffm-custom-checkbox-with-html-field/ to create a custom checkbox with html.

I've created a view at C:\inetpub\wwwroot\iProspect\Website\Views\Form\EditorTemplates\CheckboxWithHtmlField.cshtml

I've created the class that is gonna be used with the View like this :

I've create this class.

When I go to the page where the form lives, I only see the Title next to the checkbox and not the data from the HtmlText.

Any ideas why?

1 Reply

  • Hello,

    I would like to add that my goal is to create a Terms Agreement checkbox. So, the checkbox needs to be selected in order to validate the form and the text needs to be html so the content editor can add links.

    I've also added a validation rule to the Field Type, but then I have issues with droplist.

     

    Server Error in '/' Application.


    Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

    Exception Details: System.ArgumentException: Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.

    Source Error: 

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


    Stack Trace: 

    [ArgumentException: Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.]
       System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String argument) +11821198
       System.Web.UI.Control.ValidateEvent(String uniqueID, String eventArgument) +143
       System.Web.UI.WebControls.DropDownList.LoadPostData(String postDataKey, NameValueCollection postCollection) +86
       System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +558
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2927

     

    Any suggestions?

    Thanks