How to map radio button or multiple choice field for add contact via api
I have the contact form with different text box fields and radion buttons and multiple-choice values. i need to add these form entries in my Wild Apricot Contact list via API.
I have mapped successfully string and single-line text fields. but not able to map the like radio button fields and checkbox fields. please can you help me out this? i am using node.js to send API requests.
-
What exactly is going on with the gender field? Is it mapped to the wrong value or created user doesn't have this field at all?
Could you try with another Multiple choice field? Maybe to create a public field for test purposes and try with it.
-
Anonymous commented
{
"FieldName": "Identified Gender",
"SystemCode": "custom-11685491",
"Value" : [
{
"Id": 12827714
}
]
}
i have try with this one. but it is not working. these are my fields of gender. i mapped explicit values.
{
"Id": 11685491,
"FieldName": "Identified Gender",
"Type": "MultipleChoice",
"AllowedValues": [
{
"Id": 12827714,
"Label": "Male",
"SelectedByDefault": false
},
{
"Id": 12827715,
"Label": "Female",
"SelectedByDefault": false
},
{
"Id": 12827716,
"Label": "Prefer Not to Answer",
"SelectedByDefault": false
}
],
"IsSystem": false,
"Description": "",
"Order": 2,
"SystemCode": "custom-11685491",
"IsRequired": false,
"Access": "Nobody",
"AdminOnly": false,
"MemberOnly": false,
"IsBuiltIn": false,
"SupportSearch": true,
"IsEditable": true
}, -
Anonymous commented
let me try with ID value and let you know.
-
I tried your JSON format and it's working well for me (except that Email, FirstName, LastName and FieldValues should be in quotes). Moreover, you can delete the Label and SelectedByDefault fields, leaving just the Id.
What exactly is going on with the gender field? Is it mapped to the wrong value or created user doesn't have this field at all?
Could it be that the Gender field is for members ("MemberOnly": true) and you are trying to create a non-member contact?
(Edited by admin) -
Anonymous commented
What is the exact value I need to pass it in my JSON for gender values? first name, email and last name are added. but the gender field is not mapped with it.
-
Anonymous commented
i would like to map my gravity from the gender option with the wild apricot contact field via add contact API. this is my gender field that I get it from contact/fields API.{
"Id": 11685491,
"FieldName": "Identified Gender",
"Type": "MultipleChoice",
"AllowedValues": [
{
"Id": 12827714,
"Label": "Male",
"SelectedByDefault": false
},
{
"Id": 12827715,
"Label": "Female",
"SelectedByDefault": false
},
{
"Id": 12827716,
"Label": "Prefer Not to Answer",
"SelectedByDefault": false
}
],this is my api call that i am try to send it for add contact to WA.
var options = { method: 'POST',
url: 'https://api.wildapricot.org/v2/accounts/111111/Contacts/',
form:
{
Email: "imran@im.com",
FirstName: "imran",
LastName: "khan",
FieldValues: [
{
"FieldName": "Identified Gender",
"SystemCode": "custom-11685491",
"Value" : {
"Id": 12827714,
"Label": "Male",
"SelectedByDefault": false
}
}
]
},
headers: {
'content-type': 'application/x-www-form-urlencoded',
'Accept': 'application/json',
"Authorization": "Bearer "+body.access_token
},
json: true
}; -
Hello,
Where exactly do you stuck? -
Brian Persson commented
Do the Wild Apricot developers or anyone know the answer to this question?
-
Anonymous commented
Please any one suggest me something related to it.