field to be automatically filled in with the value equal to the last iduser

  • DAVIDPL
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 68
  • Thank you received: 0

DAVIDPL created the topic: field to be automatically filled in with the value equal to the last iduser

I need to make a form with a numeric field to be automatically filled in with the value equal to the last iduser + 1 value of users. from Joomla
#240865
  • TheMuffinMan
  • TheMuffinMan's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 8401
  • Karma: 164
  • Thank you received: 669

TheMuffinMan replied the topic: field to be automatically filled in with the value equal to the last iduser

Hi,

please create a hidden input field with name "next id" and add this as default value:
<?php $db = JFactory::getDbo(); $db->setQuery("Select max(id) From #__users"); return $db->loadResult() + 1;?>

Regards,
Markus

===========================
If you are happy, please leave us a small review here to keep us motivated:
(Please turn off your VPN and local Apache prior reviewing as your review might get blocked)

⭐⭐⭐⭐⭐ BreezingForms: extensions.joomla.org/extension/contacts...orms/breezing-forms/
⭐⭐⭐⭐⭐ ContentBuilder: extensions.joomla.org/extension/authorin...tion/contentbuilder/

===========================
Satisfied?
Get a membership!
===========================
#240907
Moderators: ForumSupport
Time to create page: 0.044 seconds

We Are Doing Our Part

Massive discounts on all of our extension subscription plans to help you and your business in these times.

Get Your Subscription Here

New Icon Packs Category!

Crosstec is now offering icon packs.

If you are a paying subscriber, icon packs are automatically added to your account.

Check out our icon packs page!

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

We are doing our part and support your business with extremely low prices -- For example 6-Months-Subscription for only $9 USD. For as long as necessary.

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!