Forum Discussion
iftomkins I don't think you need custom content. You can manage it by "Page Hitbox Content " area at skin's header section.
Using JS.
- VarunGrazitti11 years agoBossbhupen - Sorry but using JS is not always the best option and is certainly not in this case, moreover the requirement is to store the user preference to a custom field, how can you store a user preference and than check it using JS without having the custom field in place. He is referring to custom fields and not the custom content.
- bhupen11 years agoAdvisor
VarunGrazitti I was just giving him idea if this way it help him.
- iftomkins10 years agoMaven
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
- 11 months ago
- 10 days ago
- 11 months ago
- 11 months ago