Skip to main content

FORMS: Automatically Update Object ID Based on Question Text

Objective:

Refine the current process of generating Object IDs in the form builder by dynamically creating object IDs based on the form field’s associated question. This will make the Object IDs more intuitive and relevant to the content, rather than using the default element-based naming convention.

Current State:

At present, the system automatically creates object IDs based on the element name (e.g., formSubheader_2), which is functional but not descriptive or intuitive for users who are managing form data, especially in complex forms with numerous fields.

Proposed Solution:

  • Auto-Generate Object IDs Based on Question Text:

    • When a form field is created or updated, the Object ID will be generated based on the question text instead of the element type.

    • For example, if the question is “What is your preferred contact method?”, the Object ID might be generated as preferred_contact_method instead of something like textField_1.

    • Spaces will be converted to underscores, and special characters will be removed to ensure valid object IDs.

  • Editable Auto-Generated IDs:

    • Users will still have the option to manually edit or override the auto-generated Object ID if needed.

  • Form Settings Toggle:

    • Provide a toggle in the form settings to allow users to enable or disable the automatic generation of Object IDs based on question text.

    • If the toggle is disabled, the current system-generated object IDs will be used (e.g., formSubheader_2).

  • Suffix/Prefix Customization:

    • Allow users to set global suffixes or prefixes for Object IDs, providing further control over the object ID naming convention.

Benefits:

  • Enhanced Clarity: Object IDs that reflect the actual question content make form management more intuitive, particularly when exporting form data for integrations or troubleshooting.

  • Improved Data Organization: This will ensure that form fields are easily identifiable by their purpose, reducing confusion when reviewing or editing large forms with many fields.

  • Customization Flexibility: The ability to apply custom prefixes or suffixes to Object IDs offers flexibility for businesses with specific data management requirements.

Status: In Review2 comments

Log in to comment and vote

Comments2

  • egmc

    •

    Sep 25, 2024

    Keith, How you extracted that scope out of half a sentence I’m not sure, but i’m impressed ;) - i’m also surprised its never came up before. Agree with helping with integrations for sure. thanks for doing all this so quickly.

  • Keith Azzopardi

    •

    Sep 24, 2024

    Original Request:

    Automatically update the object id based on the question

    would be super helpful to do this, so you don’t have to go back and do it, you could also have an option to turn it on or off in form settings and maybe apply suffix or prefix