Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Simple question, I know, but I've been at this 100 different ways and nothing achieves the result I want: a simple welcome message on the user login form. Hook_form_alter gives me an undefined error and adding form elements through the drupalgap.js results in other issues. Does anyone know how to do this?
Comments
Comment #1
tyler.frankenstein CreditAttribution: tyler.frankenstein commentedYou can try to use the form prefix/suffix:
http://www.drupalgap.org/node/276
Or you can place an element on the form as markup:
Comment #2
eudaemonia CreditAttribution: eudaemonia commentedPlacing the element on the page does print the message (Hello) on the form, but it also prints "undefined" just above it. How do I remove the undefined? Does 'my_markup' need to be defined somewhere else? Thanks for your quick reply.
Comment #3
tyler.frankenstein CreditAttribution: tyler.frankenstein commentedActually, it turns out there was a bug with this. Thanks for reporting this problem.
Grab the latest bin/drupalgap.js file for this fix (it also fixes the "undefined" problem): http://drupalgap.org/download
I've also updated the documentation to include an example of form element markup:
http://www.drupalgap.org/node/278