drupal_add_js() and drupal_add_css() shouldn't be used to attach stuff to a form, as it isn't loaded on validation errors.

It's best practice to add it through attaching it to the form with:

$form['#attached']['js'][] = $path . '/js/friendly_register.js';
$form['#attached']['css'][] = $path . '/css/friendly_register.css';
?>
CommentFileSizeAuthor
#1 attach_js_css-2501205-1.patch847 bytesmrharolda
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mrharolda’s picture

Status: Active » Needs review
StatusFileSize
new847 bytes
spadxiii’s picture

Status: Needs review » Reviewed & tested by the community

Looks good and works fine!

jasom’s picture

#1 worked for me, please commit the patch.

asherry’s picture

+1 for me too

Albert Volkman made their first commit to this issue’s fork.

  • Albert Volkman committed 6e0f3a7 on issue/friendly_register-2501205-2501205-attach-jscss-instead authored by MrHaroldA
    Issue #2501205 by MrHaroldA, Albert Volkman: Attach js/css instead of...

albert volkman’s picture

Status: Reviewed & tested by the community » Fixed

Thank you @MrHaroldA!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.