TOPIC:

Submitted form ID 1 month 2 weeks ago #246219

  • Topic Author
  • deeplogica
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 44
  • Thanks: 0
Correction - the assessee is also not being stored.

Whats happening is its keeping the last value and not setting the new value of the form.

so the setValue is not working on any of the fields.
:(

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

Submitted form ID 1 month 2 weeks ago #246252

  • Topic Author
  • deeplogica
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 44
  • Thanks: 0
ok, so I am seeing the following issue:

The first time I run the questionnaire, I AM getting my session id and its saving the other values, however!
If I run this a second time, then the session id is being populated from the PREVIOUS submitted record and is ignoring that I have called a setValue of the session id in the before form piece:
$this->execPieceByName('ff_InitLib');
$session = JFactory::getSession();
$sessionid = $session->getId();
ff_setValue('thissession', $sessionid); THIS IS BEING IGNORED

I tried by resetting the session hidden input in the Initialization Script to '' and then setting it from the before form piece, but that doesnt set it - it remains blank.

every person can respond to the questionnaire multiple times as each time they will be responding to a different person, so they MUST have unique entries.

I dont know whats going wrong here!

thanks

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

Last edit: Post by deeplogica.

Submitted form ID 1 month 2 weeks ago #246271

  • TheMuffinMan's Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 10063
  • Karma: 167
  • Thanks: 798
Hi,

about the assesse problem:

My 2 finds on this

1)
$assessor = $params;

ff_setValue('assessee', $assessee);

There is no $assessee variable, you probably meant to pass $assessor?

2)

Even if you would pass $assessor, it would be an array because you pass the url to parse_url() and populating a textfield with an array wouldn't work (it would just print "Array" as field value).

I would rather suggest to store the url as text:
ff_setValue('assessee', $url);

For your recent session issue I am not sure why you would want to store the session id in a field?

If you want to prevent a user with the same session to submit more than once you would simply add this in an end submit piece:
JFactory::getSession()->set("form_submitted", true);

and in the before form piece checking if it has been set already (at the top of the pieces code):
if(JFactory::getSession()->get("form_submitted", false)){ // false is the default value if not being set yet
   JFactory::getApplication()->redirect("https://some/error/page.html");
}

The above would forward to an error page if the user already made a submission within his session.

Regards,
Markus

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

Last edit: Post by TheMuffinMan.
Moderators: ForumSupport
Time to create page: 0.047 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!