query database with current form field value

  • Posts: 7462
  • Karma: 150
  • Thank you received: 551

TheMuffinMan replied the topic: Re: query database with current form field value

Hi,

ok this still requires ajax then. Approx. by monday I will release a ready-to-run addressbook form app. The code inside may be used to achieve this (of course by extracting the necessary parts and incorporating it into your form).

By the way, BF will have a service interface in the future that will make things like these a lot easier.

For the address book form, please get back to me by monday (late evening if possible).

Regards,
Markus

===============================================
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
#65563
  • winstonp
  • Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 26
  • Thank you received: 1

winstonp replied the topic: Re: query database with current form field value

Ok, fantastic. I'll check back Monday evening. Thank you again.

In the mean time, I had another thought that might work for guys like me with little to no JS experience--

Maybe I could create multiple forms. The first form is just the simple date entry form that creates the uniqident ("42201214"). On form submit, I could query the exercise table for that uniqident. If it exists, the user would be routed to a 2nd form---one that updates the existing 42201214 entry. If it doesn't exist, the user would be routed to a third form--one that adds a new entry to the table...

I guess for that to work, I would have to be able to assign the uniqident to a variable, that would be recognized across multiple forms.

Is that possible? Would declaring a global variable in the first form keep its value and be recognized in the 2nd or 3rd form?
#65602
  • Posts: 7462
  • Karma: 150
  • Thank you received: 551

TheMuffinMan replied the topic: Re: query database with current form field value

Hi,

that would work, too, if the workflow is ok for you.

In form => advanced => more options => submit pieces => end submit => click "custom"

In the codebox you can access the values from the submission and redirect to the page with the other form, example:
$this->execPieceByName('ff_InitLib');
JFactory::getApplication()->redirect( "index.php?option=com_breezingforms&Itemid=999&ff_name=FORMNAME&firstname=".ff_getSubmit( 'firstname' ) . '&lastname=' . ff_getSubmit( 'lastname' ) );

Replace 999 with the desired Itemid and FORMNAME with the name of the target form.

In the target form, you can access the values from the url in the default values like this:
<?php return htmlentities(JRequest::getVar('firstname')); ?>

However, the form I was talking about previously is almost done!

Regards,
Markus

===============================================
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
#65692
  • Posts: 5
  • Thank you received: 1

lowenstein63 replied the topic: Re: query database with current form field value

Hi Marcus,

Where can I find the address book form to look at?

Thanks,
Al
#66113
  • Posts: 7462
  • Karma: 150
  • Thank you received: 551

TheMuffinMan replied the topic: Re: query database with current form field value

Hi, we are doing some little fixes and then I will release it immediatly, please wait a little.

===============================================
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
#66121
  • Posts: 7462
  • Karma: 150
  • Thank you received: 551

TheMuffinMan replied the topic: Re: query database with current form field value

Hi,

it is finished, can you please contact me to get a copy? (as it is commercial) => markus.bopp@crosstec.org

Regards,
Markus

===============================================
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
#66166
Moderators: ForumSupporttomeperica
Time to create page: 0.072 seconds

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here

News and Updates

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

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99€

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!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here