Refreshing Multi-step form with Custom Fieldtype/Control generates error
Hi guys,
hope someone can help me with this problem.
I'm having a custom Fieldtype (basically a textbox with some extra stuff) enabling visitors to select a person from a list of persons. After this they click next and in the next form step they fill in some information.
Now when I select a person from the list, click next and then Refresh the page I get an error referring to my custom Control.
System.Web.HttpException: Unable to find control id
'RelatieVraagTherapeutId' referenced by the 'ControlToValidate' property
of 'mandatory'. Generated: Mon, 20 Aug 2012 16:11:07 GMT
System.Web. HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.Web.HttpException (0x80004005): Unable to find control id 'RelatieVraagTherapeutId' referenced by the 'ControlToValidate' property of 'mandatory'.
at System.Web.UI.WebControls.BaseValidator.CheckControlValidationProperty(String name, String propertyName)
at System.Web.UI.WebControls.BaseValidator.ControlPropertiesValid()
at System.Web.UI.WebControls.BaseValidator.Validate()
at System.Web.UI.Page.Validate(String validationGroup)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
... etc
The control ID 'RelatieVraagTherapeutId' did not match the clientID from the textbox. so I gave the custom Fieldtype a static ID 'RelatieVraagTherapeutId'. But still ... the same error appears.
public class PCListMembers : FieldType { public CustomControls.PCListOfTherapists lt = new CustomControls.PCListOfTherapists();
public PCListMembers() { //Provider this.Name = "Filterlijst Postcode/Afstand"; this.Description = "Filterlijst waarin een therapeut geselecteerd kan worden."; this.Id = new Guid("aaa47ea9-2a78-4524-b9d6-6dfaeab39c31");
Did that both. Still the same error when hitting F5 on step 2. Little different now:
Unable to find control id '4a8e7678_932e_4c3d_8d77_39bb02272ceb' referenced by the 'ControlToValidate' property of 'mandatory'.
But that's just the Control ID. (although the control ClientID is ContentPlaceHolderDefault_ctl06_RenderForm_1_rpFieldsets_rpFields_0_4a8e7678_932e_4c3d_8d77_39bb02272ceb_0 )
Refreshing Multi-step form with Custom Fieldtype/Control generates error
Hi guys,
hope someone can help me with this problem.
I'm having a custom Fieldtype (basically a textbox with some extra stuff) enabling visitors to select a person from a list of persons. After this they click next and in the next form step they fill in some information.
Now when I select a person from the list, click next and then Refresh the page I get an error referring to my custom Control.
The control ID 'RelatieVraagTherapeutId' did not match the clientID from the textbox. so I gave the custom Fieldtype a static ID 'RelatieVraagTherapeutId'. But still ... the same error appears.
Anyone have experience with this?
Martin
btw: I'm using Umbraco 4.7.2 and Contour. 1.1.13
Comment author was deleted
Hey Martin,
Could you share the code for the custom fieldtype ?
Hi Tim,
Thanks for responding so fast!
This is the Code for the Custom Fieldtype:
And this is the code for the custom Control that's referenced:
So what it does is Call an ajax method which loads a list of members dynamically and inserts them in some nice way in a scrolled div.
Then if you click on one of the members, the memberid is getting saved in a hidden TextBox, the value of which gets saved in the contour form.
Comment author was deleted
Could you try moving the lt =newCustomControls.PCListOfTherapists(); into the constructor ?
Comment author was deleted
+ remove
Hi Tim,
Did that both. Still the same error when hitting F5 on step 2. Little different now:
But that's just the Control ID. (although the control ClientID is ContentPlaceHolderDefault_ctl06_RenderForm_1_rpFieldsets_rpFields_0_4a8e7678_932e_4c3d_8d77_39bb02272ceb_0 )
Hi Tim,
Could you look into this again? It's happening with all my forms with custom Field Types.(I've constructed several)
hope to hear from you!
Martin
Hi Tim,
You havent responded yet. Probably lots of things on your agenda.
Anyways, I'd love to know at least if its still on your radar and whether you could plan in some time. (even if it's in a few weeks I'd be greatful)
thanks in advance.
Martin
Ok, I now think it isn't the custom Fieldtype after all, because I'm having similar issues on other forms.
And other users seem to experience these too: http://our.umbraco.org/forum/umbraco-pro/contour/28594-Contour-form-steps
So, I don't know what's wrong. But it's pretty weird behavior. Anybody got a workaround?
Martin
is working on a reply...