How to order fields (native+custom) in contact form

Need help with the Administration of your Joomla! 3.x site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Post Reply
titi222
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Mon Apr 27, 2015 5:05 pm

How to order fields (native+custom) in contact form

Post by titi222 » Wed Nov 07, 2018 5:46 pm

Hello

I added custom fields for the native contact form.
How can I manage the order of the fields?

Because currently the display is from the contact card gives:
  • native fields contact form
  • recaptacha
  • custom fields contact form
whereas it would be necessary to have:
  • a precise order for all native fields and custom fields
  • recaptacha
Thank you in advance,

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 36445
Joined: Sat Apr 05, 2008 9:58 pm

Re: How to order fields (native+custom) in contact form

Post by Webdongle » Wed Nov 07, 2018 5:59 pm

http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

User avatar
effrit
Joomla! Guru
Joomla! Guru
Posts: 846
Joined: Sun Nov 12, 2017 2:21 pm
Location: middle of Russia
Contact:

Re: How to order fields (native+custom) in contact form

Post by effrit » Wed Nov 07, 2018 6:07 pm

or u can use js / jquery to move fields if overriding too complicated for you, sometimes it's more effective way

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 36445
Joined: Sat Apr 05, 2008 9:58 pm

Re: How to order fields (native+custom) in contact form

Post by Webdongle » Wed Nov 07, 2018 7:05 pm

That's interesting ... how would using js / jquery to move fields be accomplished ?
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

User avatar
effrit
Joomla! Guru
Joomla! Guru
Posts: 846
Joined: Sun Nov 12, 2017 2:21 pm
Location: middle of Russia
Contact:

Re: How to order fields (native+custom) in contact form

Post by effrit » Thu Nov 08, 2018 3:49 am

read about jQuery functions: append(), appendTo(), prepend()

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 36445
Joined: Sat Apr 05, 2008 9:58 pm

Re: How to order fields (native+custom) in contact form

Post by Webdongle » Thu Nov 08, 2018 9:52 am

A Template override would still be needed for that. And also that is far more advanced than just rearranging position of the html/php.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

User avatar
effrit
Joomla! Guru
Joomla! Guru
Posts: 846
Joined: Sun Nov 12, 2017 2:21 pm
Location: middle of Russia
Contact:

Re: How to order fields (native+custom) in contact form

Post by effrit » Thu Nov 08, 2018 12:27 pm

no, this is about 2-5 jQuery strings without any overrides (i dont know why u love them so much - they are not only solution :D).
and this is not advanced knowledge, just link js file/paste code in template field/module or plugin, learn examples and try it.

User avatar
pmleconte
Joomla! Explorer
Joomla! Explorer
Posts: 339
Joined: Fri Mar 17, 2017 12:55 pm
Location: France

Re: How to order fields (native+custom) in contact form

Post by pmleconte » Thu Nov 08, 2018 2:32 pm

Hi,

Just gave an idea on the french forum: if captcha position bugs you, use invisible captcha. That's a 3.9 new feature.

Everything else will require an override.

Pascal
If anything can go wrong, it will.
https://www.conseilgouz.com/en

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 36445
Joined: Sat Apr 05, 2008 9:58 pm

Re: How to order fields (native+custom) in contact form

Post by Webdongle » Thu Nov 08, 2018 3:12 pm

effrit wrote:
Thu Nov 08, 2018 12:27 pm
no, this is about 2-5 jQuery strings without any overrides (i dont know why u love them so much - they are not only solution :D)....
You need to use an override to put the code in otherwise you will be editing core files. Please stop posting irrelevant posts just so you can spam your sig.

Whenever code is introduced to alter the layout of a Component (or module) then either the core file (that displays the layout) has to be modified or overridden by a similar file that has the code positioned differently. Modifying the core files is not advised because they can get altered in an update.

So whatever method is used to alter the layout (whether it is adding a javascript call to the file or altering the order of the php calls) ... it is advisable to use overrides in the way they are designed to be used.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 36445
Joined: Sat Apr 05, 2008 9:58 pm

Re: How to order fields (native+custom) in contact form

Post by Webdongle » Thu Nov 08, 2018 3:34 pm

That will not alter the positions in the output file without adding code to the output file itself or overriding it.

The position of the code in the Component's output file determines the position of the data that is rendered in the browser.
Whatever code is used to alter the position of that code requires either the file to be edited or overriden.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

titi222
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Mon Apr 27, 2015 5:05 pm

Re: How to order fields (native+custom) in contact form

Post by titi222 » Sun Nov 11, 2018 6:08 pm

Hello

Thanks for all your answers. But all your solutions are not for neophyte ;)

It will be nice to have a Joomla interface to arrange fields order (and for all fields = native and custom) : it will be more simply ?


Post Reply

Return to “Administration Joomla! 3.x”