I am having issues when using this field. It never hits the breakpoint that i set on Process value.
public class PostcodeField : FieldType
{
public PostcodeField()
{
Id = new Guid("06681d21-021e-43d6-8932-942f2092fe2f");
Name = "Postcode";
Description = "Renders a textbox and button for postcode";
DataType = FieldDataType.LongString;
}
Custom field with multiple textbox
Below is a snippet of my custom postcode field.
I am having issues when using this field. It never hits the breakpoint that i set on Process value.
public class PostcodeField : FieldType { public PostcodeField() { Id = new Guid("06681d21-021e-43d6-8932-942f2092fe2f"); Name = "Postcode"; Description = "Renders a textbox and button for postcode"; DataType = FieldDataType.LongString; }
Here is snippet for .cshtml. Please help I am not sure what i could be doing wrong
Comment author was deleted
Is that the complete code, mind sharing it then I can give it a go?
yes that is the complete code for the field types.
Here is the complete cshtml
@model Umbraco.Forms.Mvc.Models.FieldViewModel
<script type="text/javascript"> parkerfox.loan.appform = new parkerfox.loan.AppForm(); $(function () { // Constructor init call parkerfox.loan.appform.init({ AppFormSelector: $('#AppForm'), AppFormErrorBox: $('#AppFormErrorBox'), AppFormSubmitButton: $('#submitAppFormButton'), AppFormLoanAmountValidation: { minAmount:"100" , maxAmount: "1000" }, AppFormSelectAddressWrapper: $('#SelectAddressWrapper'), AppFormFindAddressWrapper: $('#FindAddressBtnWrapper'), AppFormFindAddressButton: $('#FindAddressBtn'), AppFormInputAddressWrapper: $('#InputAddressWrapper'), AppFormPayDayFrequency: $('#PayDayFrequency'), AppFormNextPayDate: $('#NextPayDate'), AppFormManualAddressMessage: $('#ManualAddressValidation'), AppFormMobileOnly: true, postcodeServerURL: 'https://www2.memcapital.com/postcodeservice/postcodeserver.aspx?pc=' }); }); </script>'
All the other bits is just javascript.
Hi Tim
The initial code i gave was the complete code. Anything extra is javascript
<script type="text/javascript"> parkerfox.loan.appform = new parkerfox.loan.AppForm(); $(function () { // Constructor init call parkerfox.loan.appform.init({ AppFormSelector: $('#AppForm'), AppFormErrorBox: $('#AppFormErrorBox'), AppFormSubmitButton: $('#submitAppFormButton'), AppFormLoanAmountValidation: { minAmount:"100" , maxAmount: "1000" }, AppFormSelectAddressWrapper: $('#SelectAddressWrapper'), AppFormFindAddressWrapper: $('#FindAddressBtnWrapper'), AppFormFindAddressButton: $('#FindAddressBtn'), AppFormInputAddressWrapper: $('#InputAddressWrapper'), AppFormPayDayFrequency: $('#PayDayFrequency'), AppFormNextPayDate: $('#NextPayDate'), AppFormManualAddressMessage: $('#ManualAddressValidation'), AppFormMobileOnly: true, postcodeServerURL: 'https://www2.memcapital.com/postcodeservice/postcodeserver.aspx?pc=' }); }); </script>Comment author was deleted
Ok and the fieldtype does show up in the fieldtype dropdown when you create/edit a field in contour since some stuff seems missing
Thanks Tim i removed all the javascript and ensured the mandatory checkbox was not ticked and it seems the custom field was working correctly.
I was able to validate and process field values
Comment author was deleted
Great :)
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.