× Form Help

Integrator not working when 2 elements are inserting to the same field

  • 5uwebsite
  • Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 123
  • Thank you received: 2

5uwebsite created the topic: Integrator not working when 2 elements are inserting to the same field

Hi there,

I found that integrator won't be able to create a new record in the database table, when more than one form element is copy to the same field.

For example, my form has a visibility rule to show 3 different lists, depends on the "country" value selected. That is, if USA is selected, then show the field of USA States. If Canada is selected, then show the field of Canada provinces. The value for state or province will be copy to the same field of the database. As shown here:

mrkr.io/s/5c0ca6ea286acc1ad3103572/0

However, I realized that this won't work, unless there is ONLY one element inserting to this field. If there are more than one elements are pointing to the same field, then integrator is unable to insert a new record when I am submitting a record at the frontend.

May I ask whether you had encountered such a situation and how it was solved?

Thanks,
#232577
  • Posts: 1955
  • Karma: 67
  • Thank you received: 238

mihaela replied the topic: Integrator not working when 2 elements are inserting to the same field

Hello,

Connecting more than one element isn't native functionality for the Integrator.
The problem is that it comes to conflict since Integrator doesn't know which of the fields value from the form to pass to the database table.

Despite that, after some testing I came to a conclusion that this will work if only one of the connected elements is filled in.

Since you are using select list, you MUST have first select list option defined similar to this:
0;Choose state;
The important part is that after the second semicolon there is empty value.
This is because for select list a first option is always selected even though the list might even be turned off (which is your case).

That is why this couldn't work, because the integrator had three values to put in one database table field which was impossible.

Try defining the Mexico_States, United_States and Canada_Province with first option as explained and let me know whether it resolved the issue.

Regards,

Mihaela
#232594
  • 5uwebsite
  • Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 123
  • Thank you received: 2

5uwebsite replied the topic: Integrator not working when 2 elements are inserting to the same field

Hi Mihaela,

Thank you very much for your help, and this method is working well and the problem is now solved! Great solution! Easy to implement and works fast!

If you have a minute, could you also take a look at my another post?

crosstec.org/en/forums/37-contentbuilder...ing-page.html#232572

Thanks!
#232623
  • Posts: 1955
  • Karma: 67
  • Thank you received: 238

mihaela replied the topic: Integrator not working when 2 elements are inserting to the same field

Hello again,

I'm glad I've helped and that the suggested solution worked for you. :)

I will take a look at the other post.

Regards,

Mihaela
#232644
  • 5uwebsite
  • Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 123
  • Thank you received: 2

5uwebsite replied the topic: Integrator not working when 2 elements are inserting to the same field

Thanks Mihaela. After many test input, we found something interesting... It appears that the entered value for the "State" is always "Alaska" in database, no matter which country or which state I selected from the list.

Is there anything else we should do, so that the database will only store the value we actually selected at the frontend submission page?

Thanks,
#232911
  • Posts: 1955
  • Karma: 67
  • Thank you received: 238

mihaela replied the topic: Integrator not working when 2 elements are inserting to the same field

Hello,

From what you have explained it seems as in one of the select lists, "United_States" I suppose, you left Alaska as first option like this:
0;Alaska;Alaska
0;...
or as if you have select list defined like this:
0;Choose state;
1;Alaska;Alaska
0;...
In this second case, the option form which "1" is before the first semicolon, that is the value that will be automatically set on form load.

Please check how are list values defined and let me know whether it was one of above cases.

The list should be defined like this:
0;Choose state;
0;Alaska;Alaska
0;...
or with 1 before Choose state, since that is the option you want to have set as default.

Let me know whether this helped.

Regards,

Mihaela
#232924
Moderators: ForumSupporttomeperica
Time to create page: 0.066 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