Jump to content
  • 0

Custom Button Next To Submit/Update


kpcollier

Question

5 answers to this question

Recommended Posts

  • 0

I've decided to just eliminate the cbSubmitContainer and create a new Submit button along with my Previous button. Instead of the Previous button going back to the Submission Form (step 1), it goes to a Single Update Form that is identical (Thanks @NiceDuck). The custom Submit button still works with Destination Options when trying to use query string values.

Link to comment
Share on other sites

  • 0
On 10/23/2019 at 2:25 PM, kpcollier said:

I've decided to just eliminate the cbSubmitContainer and create a new Submit button along with my Previous button. Instead of the Previous button going back to the Submission Form (step 1), it goes to a Single Update Form that is identical (Thanks @NiceDuck). The custom Submit button still works with Destination Options when trying to use query string values.

Howdy kpcollier,

 

Can you post the code you used for each button so I can look at what you did to create a custom caspio submit and next button. I am doing the same thing and want one button to be a quick add (submit) button and the other to be a next button which passes parameters to a update page to add more info for the user... any help would be appreciated!

 

Thanks

Link to comment
Share on other sites

  • 0

Hey @Mikey,

Everything runs off of parameters. You need a datapage for each step, and an extra datapage for going back to 'Step 1'. The reason for this, the first step is always a submission form, and the following steps are always single update forms. If you were to click 'Previous' to go back to step 1 without making an extra Single Update Form for it,  it will just make another record instead of editing the first.

On the first step, submission form, use the 'Destination and Messaging' (the last page of the wizard) and put in the link to Step 2. Now, when you click the Next (submit) button, it will go to that page.

For the Previous button:

<input type="button" value="PREVIOUS" class="previousButton" onclick="location.href='https://xxxxxx.caspio.com/dp/e1234123412341234?CG_ID=[@EditRecordCG_ID]';" />

The Value is the text displayed on the button. The link in the href is the url to your previous step. Change the 'CG_ID' and the CG_ID Field to your own ID field. Do this for all of the previous buttons, but make sure to change the URLs for different steps.

For the Next button, it is simple:

<input class="nextButton" type="Submit" value="NEXT" />

The Type will make this a submit button. The Value is the text displayed on the button. When you are using the 'Next' button, you are really submitting the datapage and bringing up the next step, so you want to leave the Type as submit and just change the Value to Next.

For the steps after 1, to go to the next steps, keep using the 'Destination and Messaging' page to set the destination URL to your next step. What I did here for my steps 2-4 is add the next step's URL plus the ID in a parameter, and then on the next step's DataPage Wizard I used 'Find Record Through Unique ID' to receive the ID parameter that was just sent (I think Single Record Update forms make you set this, it is one of the first pages in the datapage wizard). 

When using the ID parameter in the query string parameters(URL), you need to use [@EditRecordYourID], and then in the DataPage Wizard for 'Find Record Through Unique ID' you use [@InsertRecordYourID]

 

If you need any more help just let me know!

Link to comment
Share on other sites

  • 0
On 10/23/2019 at 2:25 PM, kpcollier said:

I've decided to just eliminate the cbSubmitContainer and create a new Submit button along with my Previous button. Instead of the Previous button going back to the Submission Form (step 1), it goes to a Single Update Form that is identical (Thanks @NiceDuck). The custom Submit button still works with Destination Options when trying to use query string values.

Hello Kpcollier, how/where did you remove the cbsubmitcontainer?

Link to comment
Share on other sites

  • 0
9 minutes ago, Mikey said:

Hello Kpcollier, how/where did you remove the cbsubmitcontainer?

Sorry, I didn't update this forum post when I was messing with this app. I decided to forego removing the cbSubmitContainer and keep it in tact. Another way to achieve using the Submit button as next, is to change the Localization on all steps before your final page. In Localization you can change the Submit button name to Next. So, it looks like the Next button, but it submits the record while the query string pulls up the same record on the next step.

Hope this is making sense.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...