Why does' SetFormValue 'not take effect in docx

why connector.executeMethod(“SetFormValue”,[forms[i][“InternalId”],“OnlyOffice BANK”],null) And connector.executeMethod(“GetFormValue”, [e[“InternalId”]], function (value) {})not take effect in docx,I am unable to obtain the value of the Contentcontrol in docx

1 Like

Hello @letgooo
Do you mean this method? ONLYOFFICE Api Documentation - GetFormValue

Could you please provide us with details of the situation? If it’s possible, please record a video file of your test (we need exact test scenario steps as well) and provide us with test file, where we can reproduce the situation.
Additionally, please let us know your Document server version.

I am sorry,I confused the form with the contentControl,but How to obtain the value of a contentControl,Version 7.4,thanks

2023-07-03 19-14-35 00_00_00-00_00_30 for example,I want get “hello world” ,
so please tell me what should i do ,thanks

Thank you, we are checking the situation.

On the provided video you added Content Control. So you can use this method to get its value:ONLYOFFICE Api Documentation - GetAllContentControls

Can I use “connector” to obtain?thanks

Sure, the ‘connector’ supports all plugin methods: ONLYOFFICE Api Documentation - Automation API

I cannot use ‘connector’ to obtain the value of the Contentcontrol . I tried using ‘window. connector. init=function (text) {}’ to obtain it, but I cannot obtain it.

Sorry for the late reply. The ‘connector’ is a class which provides abilities to interact with the editor using plugin methods. To clarify the usage scenario, you have to use executeMethod to access mentioned GetAllContentControls method.
If I misunderstood your request, please provide us with details.

2023-07-03 19-14-35 00_00_00-00_00_30
ok,for example,I want get “hello world” ,use “connector”,
so please tell me what should i do ,thanks

Hello @letgooo

Please note that Automation API requires a Developer Edition of Document Server to work as per API page:

Please note that the connector is available only for ONLYOFFICE Developer Edition.

In case you have a trial or commercial license, you’d better contact us via Zendesk to get prompt replies.

I have a trial

As I can see you have contacted us via Zendesk. Please provide asked information to verify your request.