Hello, Im trying to add a field in our Form, but when data is saved, this error message is showed undefined method `id' for nil:NilClass.
Please if you can help us.
Hello, Im trying to add a field in our Form, but when data is saved, this error message is showed undefined method `id' for nil:NilClass.
Please if you can help us.
Best answer by mahendarsingh
Hi
Thank you for bringing this up.
The error message undefined method 'id' for nil:NilClass
typically indicates that something in the form or its configuration is referencing a blank or missing value. To resolve the issue:
Validate the Field Configuration: Ensure that the new field added to the form is correctly configured in Freshdesk. Confirm that all required attributes, such as field name and field type, have been set up properly in Admin > Ticket Fields.
Check Field Visibility: Verify that the field is set to be visible in the relevant ticket form. If the form being used (e.g., email source vs. portal source forms) does not include the field or has it hidden, it could cause issues during data submission.
Ensure Field-Specific Settings Are Correct:
Review Customizations or Scripts: If the form or portal has been customized, confirm that there are no broken or incorrect script references in the form submission logic. Navigate to Admin > Portals > Customize > Edit Theme > Pages to inspect modifications, especially in the layout where the form is embedded.
Troubleshoot with Sample Data: Try to save a ticket with sample data that includes the new field's value to identify if specific inputs trigger the error.
In case the issue persists please feel free to drop us your account details at support@freshdesk.com so that we can have this fixed for you.
Thank you
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.