reading params in form

  • Balma66
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0

Balma66 replied the topic: reading params in form

Cant get it to work.\
Let me explain what I want to achieve.
A guest fills in form1 his name and email. After sumitting the form he receives an email with in the mail an url with a unique code to a article with a second form ({BreezingForms : form2}).(option=com_content&view=article&id=125&catid=19&code=5de15b230b226)
With the code I want to fill the second from with the fields from the database table of the first form (form1) name and email.

in before Form I put this:
$this->execPieceByName('ff_initLib');
$trc = JRequest::getVar('code');
ff_setValue('lastname', $trc);
$db = JFactory::getDBO();//Get Database Object
$db->setQuery("SELECT record from #__facileforms_subrecords WHERE value = 5de15b230b226");
$nr= $db->loadResult() ;
ff_setValue('id',$nr);
But I get 1054 - Unknown column '5de15b230b226' in 'where clause'

One other strange thing happens, after the first show of form2 I see the uniqieke code as it is in the url
retrieving the code url: &code=5dea6c5e2dbee form2 display:5dea6c5e2dbee
On a second show of the form2 article with &code=5dea6c5e2dbe2 I see again the same code as in the first show. form2 display:5dea6c5e2dbee
Only when I saved the article with the {BreezingForms : form2} It shows the first time the right code, but next times always the first code.
What is going wrong?
#238721
  • Posts: 2986
  • Karma: 104
  • Thank you received: 394

mihaela replied the topic: reading params in form

Hello,

As for the "Unknown column '5de15b230b226' in 'where clause'" error please replace the current database query with this one:
$db->setQuery("SELECT record from #__facileforms_subrecords WHERE value = '5de15b230b226' ");

Let me know whether that resolves the problem.

Furthermore, regarding the code and article issue, I am not sure why this is happening. To be more precise, I don't understand the issue.
It should always show 5de15b230b226 in the 'lastname' field. In which case, it shows something else?

Regards,

Mihaela
#238736
  • Balma66
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0

Balma66 replied the topic: reading params in form

Hello,

The issue with form:

When I test the form2 with this url

www.labalma.eu/index.php/nl/?option=com_...9&code=5df78dda77544

Form2 opens with

code=5df78dda77544

. Looks ok. But when I test a secoond time with this url

www.labalma.eu/index.php/nl/?option=com_...9&code=5df78dda77546

Form2 shows the first

code=5df78dda77544

code instead of the new one

code=5df78dda77546

The only way is to save form2 again in menu content.
#238831
  • Balma66
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0

Balma66 replied the topic: reading params in form

I solved the issue. Instead of using Breezingform in a article index.php/?option=com_content I use ?option=com_breezingforms
#238924
  • Posts: 2986
  • Karma: 104
  • Thank you received: 394

mihaela replied the topic: reading params in form

Hello,

I am glad that you have managed to resolve this issue.

Regards,

Mihaela
#238927
Moderators: ForumSupporttomeperica
Time to create page: 0.069 seconds

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!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Summer Sale!

50% discount on all of our extension subscription plans, templates and icon packs!

Get Your Subscription 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 for just 49! (Summer Sale)

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!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

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