DrupalGap
DrupalGap copied to clipboard
How to use Drupal tokens in DG?
I there a way to user Drupal tokens (e.g. '[current-user:name]') as default values for fields in DrupalGap?
@luxio I've only toyed with token inside the DrupalGap Webform module (on the SDK side). Even then, those aren't true tokens in a Drupal sense, they are just custom webform tokens that get prepopulated into webform components.
I would just use a hook_form_alter() in DrupalGap to set the value on whatever elements/fields necessary with Drupal.user.name if they are logged in if (Drupal.user.uid) { /* they are logged in */ }.