DMXzone App Connect Support Product Page

Answered

Actions after App Connect insert

Asked 25 May 2017 22:26:56
2
have this question
25 May 2017 22:26:56 Ken Pollard posted:
I am having an issue am frustrated because I know I am missing something simple. I usually do insert with Server Connect and use an action executor to hide a div and show another on successful submit.

I recently created my first insert using Bootstrap Dynamic Form Gen 2 and App Connect. The insert is great, but I have no idea where/how to setup the show/hide or redirect to URL.

Even though it was not necessary I tried making an action executor and that worked, but the form was submitted twice. i know I am missing something simple here Can someone please point me in the right direction.

Thanks!!

Promoted Answers

Replied 24 Jun 2017 17:28:29
Ok GUYS i have found the SOLUTION.. im sure it was there all the time but NOT explained to nicely in the VIDEO.. its understandable.. as there is WAY to many things to cover..

IF YOU WISH TO PASS THE "ID" or "VARIABLE" TO THE NEXT PAGE WITH THE GO TO URL ACTION USING APP CONNECT IN THE VIDEO......

1. Create your SERVER ACTION..../...... I have used the name : Server_Action_Insert.
2. Create your CONNECTION
3. Create your Database Insert as per normal... / .... I have used the name : Database_Insert_Properties_Name
4. NB!!! NB!!! Make sure you tick the OUTPUT box ....



5. Now follow the rest of the steps to Connect Your Form via DMX APP Connect as per video.
6. When you get to the DYNAMIC EVENTS... Click it... as below.



7. Make sure you then SELECT THE "IDENTITY" ... this is the "ID" .. and say SELECT.




8. This will amend your Script like this....

<form action="dmxConnect/api/Server_Action_Insert.php"  method="post" id="Form_ID" is="dmx-serverconnect-form" dmx-on:success="browser1.goto(Form_ID.data.Database_Insert_Properties_Name.identity)" >


So at this point all it will do .. once the form is inserted is return a VALUE.. eg the ID

so you need to do this...

add in the 'yourpagename.php?id='+ the quotes and + plus is important.....

<form action="dmxConnect/api/Server_Action_Insert.php"  method="post" id="Form_ID" is="dmx-serverconnect-form" dmx-on:success="browser1.goto('yourpagename.php?id='+Form_ID.data.Database_Insert_Properties_Name.identity)" >


Hope it helps!!!!




Replies

Replied 26 May 2017 09:27:46
26 May 2017 09:27:46 Teodor Kuduschiev replied:
Hi Ken,
With App Connect you should not use HTML5 Data Bindings (or its executors).
There are dynamic and static events, which you can use to anything on success. Please check the following tutorials:
www.dmxzone.com/go/32840/using-the-go-to-url-action/
www.dmxzone.com/go/32861/resetting-dynamic-form-on-submit/
Replied 26 May 2017 21:27:56
26 May 2017 21:27:56 Ken Pollard replied:
Thanks Teodor, I knew I had missed something. Thanks for all your products, they have really reduced our development time. You obviously put a lot of thought into each one and wanted
you to know it is appreciated.

Regards!
Ken
Replied 31 May 2017 22:41:30
31 May 2017 22:41:30 Brad Lawryk replied:
Hi Teodor,

I tried following the two videos above as that is exactly what I have to do except I need to pass a URL parameter with the GoTO.

Anyways, I can't get the Go To Url action to work at all. I can get the clear form to work. So that's good. However, I really need the Go To Url to work.

Also, you can't put two on success Dynamic events on one action. How would I do both of these on a form?
Replied 01 Jun 2017 02:18:51
01 Jun 2017 02:18:51 Ken Pollard replied:
Hi Brad, I had the same question and was advised to use the static event, which was perfect. On another post they instruction for adding a url is as follows and this worked perfectly for me, the example shows using a url param, but works without it as well..
(url param browser1.goto('static-link.php?var='+id))
Replied 01 Jun 2017 07:01:00
01 Jun 2017 07:01:00 Teodor Kuduschiev replied:
Hello Brad,
What is the issue with the Go To URL action?
The dynamic link would be exactly as Ken described it:

'static-link.php?var='+id

where id is a dynamic value, without {{ }}, and the static part of the link is wrapped in single quotes.
Replied 01 Jun 2017 12:08:02
01 Jun 2017 12:08:02 Brad Lawryk replied:
Yeah, figured it out by comparing code generated in the video. In the video it adds the quotes automatically. Mine does not do that, had to manually add the quotes in the code.
This reply was removed on 6/24/2017 5:09:20 PM.
See the changelog
Replied 24 Jun 2017 17:28:29
24 Jun 2017 17:28:29 Reinhardt Ellis replied:
Ok GUYS i have found the SOLUTION.. im sure it was there all the time but NOT explained to nicely in the VIDEO.. its understandable.. as there is WAY to many things to cover..

IF YOU WISH TO PASS THE "ID" or "VARIABLE" TO THE NEXT PAGE WITH THE GO TO URL ACTION USING APP CONNECT IN THE VIDEO......

1. Create your SERVER ACTION..../...... I have used the name : Server_Action_Insert.
2. Create your CONNECTION
3. Create your Database Insert as per normal... / .... I have used the name : Database_Insert_Properties_Name
4. NB!!! NB!!! Make sure you tick the OUTPUT box ....



5. Now follow the rest of the steps to Connect Your Form via DMX APP Connect as per video.
6. When you get to the DYNAMIC EVENTS... Click it... as below.



7. Make sure you then SELECT THE "IDENTITY" ... this is the "ID" .. and say SELECT.




8. This will amend your Script like this....

<form action="dmxConnect/api/Server_Action_Insert.php"  method="post" id="Form_ID" is="dmx-serverconnect-form" dmx-on:success="browser1.goto(Form_ID.data.Database_Insert_Properties_Name.identity)" >


So at this point all it will do .. once the form is inserted is return a VALUE.. eg the ID

so you need to do this...

add in the 'yourpagename.php?id='+ the quotes and + plus is important.....

<form action="dmxConnect/api/Server_Action_Insert.php"  method="post" id="Form_ID" is="dmx-serverconnect-form" dmx-on:success="browser1.goto('yourpagename.php?id='+Form_ID.data.Database_Insert_Properties_Name.identity)" >


Hope it helps!!!!




Reply to this topic