149 posts in this topic
Recently Browsing 0 members
No registered users viewing this page.
When echoing a date field directly from the $user variable
echo $user->date; the timestamp is printed. Using
echo $users->get($user->id)->date; prints the correct formated value.
Is this a bug or or intended?
I can't add a new value to a custom PageArray field for my user.
However, when I create a new user, I CAN add the new PageArray value:
I need help. Thank you very much.
I would like to be able to fetch the labels for fields in a language different than the current logged in user.
For field values that's easy
// p is page, l is language, and f is field $p->getLanguageValue($l, $f); I'm looking for something like
$fields->getLanguageValue('en', 'length'); The only solution I know of is to save the current user language, iterate through the languages by setting the user language and fetching the value, and then restore the user language.
Is there a way to tell if a field is a multi-language field?
I am currently checking to see if the last 8 characters are 'Language' but that seems like a fragile solution.
I was working on a simple "to-do" style template that has a form on a page. Once the form is submitted, I use the API to create a new subpage under a pre-existing page, but I notice that it does resubmit the form data (as to be expected) if a user were to refresh the page. Is there a way to prevent this behavior so duplicate content will not be posted by using something like exit(), or is this not proper due to usability? I guess I am curious as to how other developers handle the same hurdle.