Forum Discussion
VarunGrazitti I was just giving him idea if this way it help him.
Thank you VarunGrazitti and bhupen ! I've made progress, but would love your advice, as I'm a bit stuck.
Lithium set up the fields, which is awesome. I'm now trying to set and retrieve values from the two custom profile fields:
profile.ideas_terms_accepted – Which is a checkbox
profile.ideas_terms_accepted_date - Which is date/time, and the value must be a signed decimal integer. It is interpreted as milliseconds since Jan 1, 1970. The value by default is displayed to include time.
So far, this is my code to set and retrieve the value for profile.ideas_terms_accepted field:
<#assign response = restadmin("/users/id/${user.id}/profiles/name/ideas_terms_accepted/set?value=true")/>
<#assign terms_accepted = rest("/users/id/${user.id}/profiles/name/profile.ideas_terms_accepted").value>
alert('${user.id}');
alert('${terms_accepted}');
It's not working. The ${user.id} is returning properly, but ${terms_accepted} is not returning a value. I tried both "true" and "checked" for the field value.
For the profile.ideas_terms_accepted_date field, I'm not sure how to generate a "signed decimal integer". I searched the community for that phrase and nothing came up.
Tips on settings and getting these values would be awesome!
- Alan
Related Content
- 10 months ago
- 10 months ago
- 10 months ago