So I’ve added a custom field via Contacts → More Actions → Manage Custom Fields.
Called the new field: dealerRequest and set it as Text.
I’ve created a custom dealer registration form and trying to save a text field input when executing the wixUsers . register function as part of the contactInfo part.
However - this is not accepted and the “dealerRequest” : String ( $w ( ‘#textBoxProof’ ). value ); line is marked red in the editor with an error: " Type ‘{ firstName: string; lastName: string; emails: string; labels: string; dealerRequest: string; }’ is not assignable to type ‘ContactInfo’. Object literal may only specify known properties, and ‘“dealerRequest”’ does not exist in type ‘ContactInfo’. It’s recommended you use a new variable, such as “let newVar = …” to make sure that all code completion work correctly."
I had this as well, I don’t think your code is wrong but the editor is not aware of the custom field you made and gives an error because of that. Try to ignore the editor and test the page anyway to see if the values end up properly in your custom field at registration.
I removed the String but it did not make any difference.
How do I privately share the URL of the site and explain where to find this and how to reproduce the problem?
Even with the new Authentication API, “CUSTOM-FIELDS !?!”… are still used in the same way as described in oren’s original question and errors do still appear. @lv2lrn4lf & @kayvon-shahir , in answer to your questions, While errors do appear in the code, if you have added the custom field to your contacts, it should still work.
I have two custom fields in my contacts/members named “role” and “industry” (capitalization is correct). But I get this error regardless of whether I put the code in the front-end or the back-end.
I tried ignoring the editor’s error but the execution halts at this line. Things crash in published site.
Good day - “Company” is a standard member field yet does not appear as a selectable field when building out the Custom Member Sign Up Form. Grateful for any insight you could share!
I figured out what my problem was. Even though the field name is Role and Industry, I needed to use small letter fields in the code because the field names are “role” and “industry”. This isn’t obvious as it’s not shown anywhere.