# OnGetCustomFields

The **OnGetCustomFields** event can be implemented by a [rename script](../../../scripting/rename_scripts) to add [custom fields](../../../scripting/rename_scripts/custom_fields_in_the_rename_dialog) to the _Rename_ dialog. This lets you provide one or more controls that users can use to pass parameters to your script.

| **Method Name:**   | OnGetCustomFields                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Argument Type:** | [**GetCustomFieldData**](../scripting_objects/getcustomfielddata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| **Return Type:**   | _none_                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| **Description:**   | <p>The <em>Rename</em> dialog will call this method when your script is loaded from a preset (or when you click the <strong>Refresh</strong> button in the integrated script editor).</p><p>The <strong>GetCustomFieldData.fields</strong> property lets you add one or more custom fields to the Rename dialog. For each field you can:</p><ul><li>Provide a label</li><li>Specify a cue banner for edit fields</li><li>Add up/down spinners to numeric edit controls</li><li>Specify a length limit for edit fields</li></ul><p>See <a href="../../../scripting/rename_scripts/custom_fields_in_the_rename_dialog">Custom Fields in the Rename Dialog</a> for more information.</p> |
