TOPIC:

Record ID in Email Subject 1 year 1 month ago #236749

  • LaurieM
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 16
  • Thanks: 0
Thanks Mario!

I've worked this out such that the field will pre-populate with the count but can be overridden by typing in a government issued number if available.

The client has had a change of mind and now all I need is the pre-populated count. All good!

Thanks,
Laurie.

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

Record ID in Email Subject 1 year 2 weeks ago #237115

  • LaurieM
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 16
  • Thanks: 0
Hi there!

I'm afraid I'm still having trouble with this.

I have the count working OK. However, because the count +1 is recorded when the form is opened, if more than one person is filling in the form at the same time the count is duplicated.

The record ID in the form records and in the database is correct, that is, it increments by 1 as expected.

Therefore, is it possible to use the record ID in the subject line of the notification emails instead of the count? This would facilitate using the email subject for tracking purposes.

Thanks,
Laurie.

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

Record ID in Email Subject 1 year 1 week ago #237158

  • LaurieM
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 16
  • Thanks: 0
Hi there!

I still need to get a unique identifier into the subject line of the Admin and Mailback notifications.

Neither of the calendar fields will do the job as they give only the date and not the time.

The code suggested earlier in this post is not suitable as when two people open the form concurrently the count+1 is the same for two submissions.

Is there any way I can get a reliable unique identifier into the subject line of the notifications?

A new feature where I could add a hidden field with an element that gives the date and time the form was opened would be great.

Thanks,
Laurie.

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

Record ID in Email Subject 1 year 1 week ago #237161

  • mihaela
  • Offline
  • Developer
  • Developer
  • Posts: 3128
  • Karma: 105
  • Thanks: 414
Hi,

Regarding the wrong count, please take a look at this piece of documentation crosstec.org/en/blog/939-count-number-of-records.html .

Here it is explained how to get the record count at the moment of submitting the form.
That way, the chances of getting the same record count are absolutely minimized.

Please implement this solution to your form.
Also, the code to add date and time to the hidden field can be added to the beginning of Actionscript of the submit button element like this:
var today = new Date();
var date = today.getFullYear()+'-'+(today.getMonth()+1)+'-'+today.getDate();
var time = today.getHours() + ":" + today.getMinutes() + ":" + today.getSeconds();
var dateTime = date+' '+time;
ff_getElementByName('HIDDENELEMENTNAME').value = dateTime;

Let me know whether you have managed to set this for your form.

Regards,

Mihaela
The following user(s) said Thank You: LaurieM

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

Record ID in Email Subject 11 months 2 weeks ago #237511

  • LaurieM
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 16
  • Thanks: 0
Hi there Mihaela!

Thanks for that help.

I have the count solution working in a test environment, but when I implement it in the intranet, the form won't submit.

When I get access to the intranet again in the coming days I intend to progressively remove features and fields from the form. I'm thinking there may be some conflict that the environment can't handle. My first target will be some code in the form pieces for fixing the calendar:
echo "
<script>
 jQuery(document).ready(function(){
	ff_getElementByName('DateBirth').addEventListener('click', function() {
	document.querySelector('#ff_elem1187_calendarButton').focus();	
});
    });
 </script>
";
echo '<script type="text/javascript">
                                        
    JQuery(document).ready(function () {
                             
        JQuery("#ff_elem1187_calendarButton").pickadate({
			format: "dd-mm-yyyy", 
                       selectYears: 101, 
			min: [1920,1,1], max: [2030,12,31],
                        selectMonths: true,
                        editable: true,
                        firstDay: 1,
			onSet: function() {JQuery("#ff_elem1187").val(this.get("value"));}
		});
        });
</script>';

It seems that there is something in the intranet environment, that's not in my test environment, causing the submit failure. Are you able to suggest any likely culprits?

Note: In the intranet, a test form with little more than the count method suggested in the post above, submits.

Thanks,
Laurie.

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

Moderators: ForumSupport
Time to create page: 0.048 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

Summer Sale!

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!