I am working on a module extension which allow users to Register via different social media/oauth accounts. These login buttons need to be added below all the forms which are anonymously available.

What is the best way I can achieve this?

  • These buttons can be defined in a small smarty template file which can be inserted into the form.
  • or can be created via JavaScript, which can be inserted into the page.

Please suggest what should be the right way to do it.

1 Answer 1


You should use Smarty:

According to the CiviCRM Javascript Reference, public-facing pages should follow the principle of Progressive Enhancement.

"Front-facing pages like contribution pages and event signups should adhere to the standards of PE. All front-end pages should be fully functional with js disabled."

  • Can you please refer to me an example where the insertion is being used? Commented Aug 14, 2015 at 7:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.