SuperOffice forms and hidden field

lock
push_pin
done
Beantwortet
9

Hi,

I have created a hidden field that I would like to populate depending on where the link for the form is used:

https://online4.superoffice.com/CustXX/CS/scripts/customer.fcgi?action=formFrame&formId=xxxxx&field_company=Test&field_myHidden=FormText
 
The URL looks good in the webpage where I have published it(when hover over it) field_company is filled in properly when form is posted and Eventdata, while field_myHidden is empty in the eventdata.
 
If I give the hidden field a default value in the form builder this value is properly passed through.
 
Any ideas what the issue can be?
 
Thanks!

16. Dez. 2024 | 01:40 PM

Alle Antworten (9)

Hi Johan, 


May I ask when did the text from the hidden field (in this example FormText) is attached to the URL 
https://online4.superoffice.com/CustXX/CS/scripts/customer.fcgi?action=formFrame&formId=xxxxx&field_company=Test&field_myHidden=FormText

Is it attached before the URL is loaded, or after?

I just did a quick test in my test environment, and it looks like if you write any text instead of "FormText" after the URL is loaded, the information is not passed to the EventData.

If that’s the case for you, my suggestion would be to attach the desired text string to the URL before the form is loaded.

16. Dez. 2024 | 03:31 PM

Hi,

I have added the link to a homepage and here is where I populate the fields, then customer clicks the URL and Company, Contact, e-email fields is properly filled in. I tested to do the same to a message field and get the same issue.

So it works with:
Text field
Contact - Name field
Contact - E-Mail field

Do not work with:
Hidden field
Request - Message

 

Here is how it looks in form builder:

 

17. Dez. 2024 | 08:20 AM

Hi John


May I clarify something about the "Request - Message" field?


When you load the URL <...>&field_Request - Message=MyTestText, the content of the field (in this case, "MyTestText") should be preloaded into the field. You should see the text appear in the field after the page loads.

Do you see the "Request - Message" field populated as expected?

Could you please provide an example of how your URL looks during the load? I would like to see the complete URL starting from after FormID. (You can remove custID and FormID)

 

18. Dez. 2024 | 06:34 AM

 

https://online4.superoffice.com/CustXXXX/CS/scripts/customer.fcgi?action=formFrame&formId=xxxx&field_company=testcomp&field_contact=Johan+Friberg&field_email=johan.friberg%40xxxx.se&field_comp_form=ServicePRO&field_error_description=Test

 

The result looks like this:

18. Dez. 2024 | 09:23 AM

Please try to change field names from 

comp_form

error_description

to

compForm

errorDescription

Does that help?

 

18. Dez. 2024 | 09:34 AM
Hi,

It makes no difference.
18. Dez. 2024 | 11:07 AM

Hi,
I am using a form in on prem but tested it Out in SOD now. It has a several hidden fields (boid, botid, bcpid, UserNameInAPP ) that is sent from the MobilePhone system where the form is embedded.
It does work..

Maybe bellow url can give you something to look into. (I also have toggled "include template variables" = ON)

https://sod2.superoffice.com/CustXXX/CS/scripts/customer.fcgi?action=formFrame&formId=XXXXXXX&field_custnr=999888&field_custuser=UserNameInApp&field_name=Kalle%20Kula&field_E-mail=TEST@outlook.com&field_phone=0709619013&field_company=H%C3%A4mtplats%202&field_ort=Stockholm&field_kommun=%C3%84lvsbyn&filed_kommunkod=2560&field_boid=104289&field_botid=3&field_bcpid=117251

I run manually process all submissions and then a triggerscript to fetch EventData , eg map in values from form to extra fields on the request created by the formsubmission.

I had a lot of help of this thread:
Processing Form by CRM-Script

 

18. Dez. 2024 | 11:53 AM

Thank you Donatas and Anders for your inputs!

So even if the fields is visible and do work for Contact, e-mail, company fields the solution where to do like Anders wrote "also have toggled "include template variables" = ON" that actually solved the problem, now all fields are populated as they should.

 

 

23 h, 0 m vor | 01:07 PM
Perfect, glad my input helped you to resolve the issue.
22 h, 38 m vor | 01:28 PM

Antwort hinzufügen