Advertisement

Error in registration using front-end

General questions relating to Joomla! 4.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Post Reply
irenuyam
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 188
Joined: Mon Mar 11, 2019 8:30 am

Error in registration using front-end

Post by irenuyam » Mon Jun 10, 2024 9:15 am

Hello. Here I am again.
I know it is not advisable to edit Joomla files but we needed to add a field in the registration form in the front-end.
In our Joomla 3, we were able to add without a problem.
Now in Joomla 4, I used the same process and was able to add the needed field in the registration form.
But when I tried to register as a new user, this error occurs:
error registration j4.JPG
Here is the field I added:
field added j4.JPG
By the way, this is installed in a localhost.
Anybody, can lend me a hand on this?
Thanks.
You do not have the required permissions to view the files attached to this post.

Advertisement
User avatar
AMurray
Joomla! Exemplar
Joomla! Exemplar
Posts: 9984
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: Error in registration using front-end

Post by AMurray » Mon Jun 10, 2024 10:38 pm

you would add fields to forms with custom fields and/or layout overrides. You're right, don't touch the core code.

I'm not an expect on custom fields or overrides, but just pointing out the correct method you probably should have used.
Regards - A Murray
General Support Moderator

irenuyam
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 188
Joined: Mon Mar 11, 2019 8:30 am

Re: Error in registration using front-end

Post by irenuyam » Tue Jun 11, 2024 1:19 pm

AMurray wrote: Mon Jun 10, 2024 10:38 pm you would add fields to forms with custom fields and/or layout overrides. You're right, don't touch the core code.

I'm not an expect on custom fields or overrides, but just pointing out the correct method you probably should have used.
I am trying out what you suggested. And when I tried to register as user, an error says that missing default value. But I don't know how to declare the default value here:
FIELD J4.JPG
Help.
Thanks.
You do not have the required permissions to view the files attached to this post.

User avatar
Moches
Joomla! Intern
Joomla! Intern
Posts: 77
Joined: Mon Aug 05, 2013 2:22 pm
Location: Mexico City
Contact:

Re: Error in registration using front-end

Post by Moches » Wed Jun 12, 2024 6:58 pm

Hello Irenuuam,

I believe you are adding the wrong values to your radio button custom field. Values are attributes to your custom field, should be 0 for flase or Not Selected, and 1 for True or Selected.

Try changing that, I have attached an image, hope it helps.

Documentation at: https://docs.joomla.org/Radio_form_field_type
custom-field-radio.png
You do not have the required permissions to view the files attached to this post.
:geek: CTO & Co-Owner del Sitio de Regalos https://laguiadelregalo.mx y el sitio de Reviews más grande de México https://buenisimo.mx desarrollados y construidos con Joomla! ;)

irenuyam
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 188
Joined: Mon Mar 11, 2019 8:30 am

Re: Error in registration using front-end

Post by irenuyam » Thu Jun 13, 2024 1:47 pm

Moches wrote: Wed Jun 12, 2024 6:58 pm Hello Irenuuam,

I believe you are adding the wrong values to your radio button custom field. Values are attributes to your custom field, should be 0 for flase or Not Selected, and 1 for True or Selected.

Try changing that, I have attached an image, hope it helps.

Documentation at: https://docs.joomla.org/Radio_form_field_type

custom-field-radio.png
Hi, thanks for replying to the thread.
I checked the documentation you attached, but I don't understand. I should add a code in what file because the example shows a code?

User avatar
Moches
Joomla! Intern
Joomla! Intern
Posts: 77
Joined: Mon Aug 05, 2013 2:22 pm
Location: Mexico City
Contact:

Re: Error in registration using front-end

Post by Moches » Sat Jun 15, 2024 8:10 pm

Hello, Irenuyam, sorry for the delay on my response...

You don't have to add any code to anywhere unless you are creating your own component or php module, the documentation states the code is an example on how the radio button behaves and its delcared on xml.

Just try the radio button custom field, you can even skip the default value, which will be asumed as true.

Then use your radio button on your form and see if it works. All you need is to give the appropriate values to your custom field and thats it.

Let me know if it worked please!

Kind regards

Moches
:geek: CTO & Co-Owner del Sitio de Regalos https://laguiadelregalo.mx y el sitio de Reviews más grande de México https://buenisimo.mx desarrollados y construidos con Joomla! ;)

irenuyam
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 188
Joined: Mon Mar 11, 2019 8:30 am

Re: Error in registration using front-end

Post by irenuyam » Tue Jun 18, 2024 2:18 pm

Moches wrote: Sat Jun 15, 2024 8:10 pm Hello, Irenuyam, sorry for the delay on my response...

You don't have to add any code to anywhere unless you are creating your own component or php module, the documentation states the code is an example on how the radio button behaves and its delcared on xml.

Just try the radio button custom field, you can even skip the default value, which will be asumed as true.

Then use your radio button on your form and see if it works. All you need is to give the appropriate values to your custom field and thats it.

Let me know if it worked please!

Kind regards

Moches
Hello, no problem if the response is late.
I still can't get it to work, I followed what you indicated. It still gives me the same error (sorry it is in Spanish):
error default value.JPG
You do not have the required permissions to view the files attached to this post.

Advertisement

Post Reply

Return to “General Questions/New to Joomla! 4.x”