skip to Main Content

I decided to create a website with joomla 4 by creating a cutom field that generates a numeric code within the field when the user registers on the site. I tried to look in joomla’s added fields but I didn’t find the possibility to implement the javascript code that automatically generates a 6-digit code with a CH prefix (i.e. CH-123456).
I would like to use the additional fields of joomla because these connect not only to the customer profile but also to the administrator home page. do any of you know how to create this field with the possibility of implementing javascript code creating random numbers? if you need more examples I can create screenshots. Thank you.

I tried to create the text field but i don’t know how to insert javascript code to create random numbers. Unfortunately I deleted the code.

2

Answers


  1. Chosen as BEST ANSWER

    Thank you for your answer. May I kindly know what you mean by module overriding? how do i create it. I use joomla 4


  2. Use overiding module or component.
    Then add new input form like

    input name = "Look some field from php admin on tabble __users"
    typen = "number" value="ch- Rand php from 100000 to 999999"
    

    Why need js instead php to get random code?

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search