TOPIC:

field to be automatically filled in with the value equal to the last iduser 8 months 5 days ago #240865

  • Topic Author
  • DAVIDPL
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 108
  • Thanks: 0
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

Please Log in or Create an account to join the conversation.

field to be automatically filled in with the value equal to the last iduser 8 months 4 days ago #240907

  • TheMuffinMan's Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 10064
  • Karma: 167
  • Thanks: 807
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

Please Log in or Create an account to join the conversation.

Last edit: Post by TheMuffinMan.
  • Page:
  • 1
Moderators: ForumSupport
Time to create page: 0.043 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

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!