I know you can do fancy things by using keywords such as:
%asset_metadata_DC.title%
Some of these are exposed through the wysiwyg editor, and others aren't. I don't mind if they are in there or not, but what I would like is a list of keyword replacements, and where they can be used.
Does anyone have a cheat sheet for keywords?
If you metadata field is called "Description", use the keyword %asset_metadata_Description%
The new version of the documentation has better lists for keywords.
In general though, metadata keywords are available for Asset Listings and Search Pages mostly. Where ever you can list assets, metadata is generally available.
Is there a keyword for the authenticated user name?
In a design area I can do
<MySource_PRINT id_name="global" var="current_user" attr="name" />
I would like to be able to write in an email message from a custom form, the name of the user who filled in the form. Ideally I could also prefill some of the fields in a form with the user's name etc, by looking up their some attributes in their user asset - if they are logged in.
This feature did exist to populate a form with user data (name, email etc) but was removed during a complete rewrite of the custom form. This happened over 12 months ago now, so its not a recent thing. We'll probably put it back one day, but it is not currently in development.
There are no keywords for this kind of thing either. It's only the design that allows it.
[quote]This feature did exist to populate a form with user data (name, email etc) but was removed during a complete rewrite of the custom form. This happened over 12 months ago now, so its not a recent thing. We'll probably put it back one day, but it is not currently in development.
There are no keywords for this kind of thing either. It's only the design that allows it.[/quote]
Was this feature ever put back in? Is there any current way to populate a form field with user attributes?
Declared variables + javascript maybe.
You could try putting global variables into the defaults for the fields (like %globals_user_username%). I'm not sure if that'll work, but it's worth a try.
For currently logged in user, you can use the global user keyword, just replace normal %asset_ with %globals_user_. For example,
%globals_user_name%
%globals_user_attribute_email%
%globals_user_metadata_Description%.
[quote]For currently logged in user, you can use the global user keyword, just replace normal %asset_ with %globals_user_. For example,
%globals_user_name%
%globals_user_attribute_email%
%globals_user_metadata_Description%.[/quote]
This works for text fields. But using %globals_user_attribute_email% in the email field comes up blank. I would use a text field to overcome this but it needs to be an email field for the form to email the user
I'm pretty sure you can use both text and email fields as a source for email addresses, even for the receipt format.
You will get a blank email if the user's email attribute is blank, or if this is a LDAP user, make sure you have setup the LDAP bridge correctly to source the email address from the directory.
edited to add:
If %globals_user_attribute_email% works for text field but not email field, then there is something wrong.
Something is wrong
Can you log this as a bug on the Bug Tracker so that we can officially investigate?
Sure can
This issue was registered as Bug #2761, which has since been assessed as an enhancement due to the design handling the keyword evaluation.
In the mean time javascript works fine to populate the field. If anyone is interested. Just place the below script below the email field (will need to use custom body copy) you will also need to replace the ID with the the correct ID for the email input field.