surveyjs / survey-creator

Scalable open-source survey software to generate dynamic JSON-driven forms within your JavaScript application. The form builder features a drag-and-drop UI, CSS Theme Editor, and GUI for conditional logic and form branching.
https://surveyjs.io/open-source
Other
896 stars 372 forks source link

All panel labels are hidden after removing questionTitleLocation property from survey #5297

Closed chancesmith closed 6 months ago

chancesmith commented 6 months ago

Are you requesting a feature, reporting a bug or ask a question?

bug

What is the current behavior?

Labels disappear.

Screen Shot 2024-03-02 at 7 11 54 PM

What is the expected behavior?

I expect the Progress Bar Type property to be removed from the property grid.

How would you reproduce the current behavior (if this is a bug)?

Call Serializer.removeProperty("survey", "questionTitleLocation");

Provide the test code and the tested page URL (if applicable)

Tested page URL: https://codepen.io/chancesmith/pen/vYMEdgX

Test code

Survey.Serializer.removeProperty("survey", "questionTitleLocation");
function SurveyCreatorRenderComponent() {
    const options = {
        showLogicTab: true
    };
    const creator = new SurveyCreator.SurveyCreator(options);
    creator.JSON = {};
    return (<SurveyCreator.SurveyCreatorComponent creator={creator} />);
}

const root = ReactDOM.createRoot(document.getElementById("surveyCreatorContainer"));
root.render(<SurveyCreatorRenderComponent />);

Specify your

andrewtelnov commented 6 months ago

@chancesmith Please hide the property instead of removing it: Serializer.findProperty("survey", "questionTitleLocation").visible = false;.

Thank you, Andrew

JaneSjs commented 6 months ago

@chancesmith, You can also use the creator.onShowingProperty event to hide unwanted settings. For more information, please visit the following demo: Hide a Category from the Property Grid.

Should you have any further questions, please feel free to reactivate this thread.

Thanks