When Cases are submitted through Online Case Forms, the Form that it is saved to depends on what is set as the Preferred form under Customization > Forms > Entry Forms.
In order to set or assign a Custom Form that is different from the Preferred Entry Form for Cases submitted through Online Case Forms, you can create a script for this. The following are needed:
1. Custom Form - The option Store Form with Record should be checked
2. Script to associate the Online Case Form with the Custom Form
To create the Custom Form:
1. Navigate to Customization > Forms > Entry Forms
2. Click Customize for Standard Case Form
3. Modify the form based on your needs
4. Check the option Store Form with Record
5. Save the Form and take note of the Internal ID of the Form created
Create a script that contains the following:
Note: The number 17 is the Internal ID of the Custom Case Form and can be different in your account.
To apply the script, do the following:
1. Navigate to Setup > Support > Online Case Forms > New
2. Choose any of the Form Type
3. Include the fields that you need for the Online Case Form
4. On the Custom Code tab, upload the script file and set Page Init Function = setCaseform
5. Save the Online Case Form
When you submit a Case using this Online Case Form, it will save the case using the Custom Form with Internal ID 17.
- The field Form Template must be added in the Online Case Form for this to work (make sure to select Hide = true)
- When setting the Internal ID of the Custom Form in the script, make sure that the Custom Form you want to use has a subtype of Case and not Case (External)