Jump to content

Search the Community

Showing results for tags 'submit'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Caspio Bridge
    • General Questions
    • Caspio JavaScript Solutions
    • Tables, Views and Relationships
    • Import/Export and DataHub
    • DataPages
    • Deployment
    • Security, Authentications, Roles, SAML
    • Styles and Localizations
    • Parameters
    • API and Integration
    • Calculations and aggregations
    • User JavaScript and CSS Discussions

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


MSN


Website URL


ICQ


Yahoo


Skype


Location


Interests

Found 20 results

  1. I've got 3 fields set as Listboxes on a Submit datapage. I'm using js to select multiple records and enter them comma delimited upon submission. The code works fine when doing it with one Listbox but I can't figure out how to get it to work for all three. Right now I'm just repeating the code for each listbox (with a different variable name for each) but it doesn't work. I imagine there's a more unified way to do this so the code covers all 3 Listboxes. Anyone have any ideas? Here's the code so far (it's obviously wrong to repeat the entire script 3 times, I just don't know how to unify it): <script type="text/javascript"> var v_state = "[@field:Field1]" ; var o_state = document.getElementById("InsertRecordField1") ; o_state.multiple = true ; function f_listbox() { if ( v_state.indexOf(",") > 0 ) { for (var i=0 ; i < o_state.options.length; i++ ) { if(o_state[i].value == v_state) { o_state.remove(i); break ; } } var o_st = v_state.split(", ") ; for (var j=0 ; j < o_st.length; j++) { for (var i=0 ; i < o_state.options.length; i++ ) { if(o_st[j]== o_state.options[i].value){ o_state.options[i].selected = true ; break ; } } } } } //window.onload = f_listbox ; document.addEventListener('DataPageReady', f_listbox()); </script> <script type="text/javascript"> var v_state2 = "[@field:Field2]" ; var o_state2 = document.getElementById("InsertRecordField2") ; o_state2.multiple = true ; function f_listbox2() { if ( v_state2.indexOf(",") > 0 ) { for (var i2=0 ; i2 < o_state2.options.length; i2++ ) { if(o_state2[i2].value == v_state2) { o_state2.remove(i2); break ; } } var o_st2 = v_state2.split(", ") ; for (var j2=0 ; j2 < o_st2.length; j2++) { for (var i2=0 ; i2 < o_state2.options.length; i2++ ) { if(o_st2[j2]== o_state2.options[i2].value){ o_state2.options[i2].selected = true ; break ; } } } } } //window.onload = f_listbox2 ; document.addEventListener('DataPageReady', f_listbox2()); </script> <script type="text/javascript"> var v_state3 = "[@field:Field3]" ; var o_state3 = document.getElementById("InsertRecordField3") ; o_state3.multiple = true ; function f_listbox3() { if ( v_state3.indexOf(",") > 0 ) { for (var i3=0 ; i3 < o_state3.options.length; i3++ ) { if(o_state3[i3].value == v_state3) { o_state3.remove(i3); break ; } } var o_st3 = v_state3.split(", ") ; for (var j3=0 ; j3 < o_st3.length; j3++) { for (var i3=0 ; i3 < o_state3.options.length; i3++ ) { if(o_st3[j3]== o_state3.options[i3].value){ o_state3.options[i3].selected = true ; break ; } } } } } //window.onload = f_listbox3 ; document.addEventListener('DataPageReady', f_listbox3()); </script>
  2. Hello, I have some js in the Destination part of a submission form, for after the Submit happens (I do this in js because there are 3 different sets of options to go to after submission, depending on what the user selected in the submission fields). I'm using window.location instead of window.open because of popup restrictions. I need to do 2 things on form submission: 1) have the existing window go to a url with parameters like a normal Caspio form can do and 2) open a different url in a new tab. So basically, the user clicks Submit, the existing window refreshes to a new page and a new tab opens to a different url. Is this possible? Something like: window.location.href = '[@field:First_URL]'; window.location.href = '[@field:Second_URL]', '_blank'; I don't know how to get it to run the code for the 2nd url before it updates to the first, as well as get the 2nd url to open a new tab.
  3. I have a Details page that I'm using Auto Submit code to cycle through and update related records. However, when it gets to the last record (for example, 4 of 4) it keeps in the 'submit' cycle. I need the form to stop submitting once it's submitted the last record. Then, ideally, I need the form to go to another web page. But getting it to stop submitting after the last record update would be a good first step. Does anyone know how to adjust the Auto Submit code I'm using below? <script type="text/javascript"> if(document.getElementById("caspioform")) { document.getElementById("caspioform").style.display = 'none'; setTimeout('document.forms["caspioform"].submit()',1000); } </script>
  4. I'm working on a Single Record Update data page. Is it possible to have automatic logout upon hitting the update button?
  5. Hi, I'm using an app parameter on a search and report that displays calculated totals based on the end users search. The end user then has the ability to make changes (via the bulk edit) to the data displayed in the report. Once the bulk edit is submitted the data on the report refreshes fine; the app parameter does not refresh to show the changes made by the end user. The app parameter is being used to display grand totals. I can click the refresh in the browser which does update the app parameter. How do I get Caspio's app parameter to update when the report is updated without performing a manual browser refresh? Thanks, Bre
  6. Hi, I have a Submission form datapage and the submit button isn't working. it's quite specifically styled, so I have added a header and footer to this page in order to contain the style, as it didn't seem to work doing it by the associated style sheet (I need a background image to span the whole table and then separate background images for individual cells). When the header and footer is enabled, the submit button doesn't work. When I delete the header and footer, the submit button does work, but my layout doesn't. I've tried adding the button as a separate element in an html field, and again it doesn't work. Does anyone know why this is happening and what I can do to sort it out? Many thanks Nikki
  7. I am using submission forms that contain links to other submission forms. I would like for the record being edited to be saved when the user clicks on the link to go to another form. I'm afraid the user will not click on the submit form and lose any information that has already been entered. I have found the javascript solution for "auto submit a datapage" in the community forum. Where does this script need to be placed so that it runs before the web browser goes to the target page? Is there an event that can be used as a trigger for the javascript? The javascript from the other post for auto submission is: <script type="text/javascript"> if(document.getElementByID("caspioform")) { document.getElementByID("caspioform").style.display= 'none' setTimeout('document.forms["caspioform"].submit()',1000); } </script>
  8. On a Details form I need to use a custom button to do the Update/Submit- that's not a problem. The issue is that I also need to run some script for that specific button to go to a url after submission, depending on the value of a virtual field. The reason I can't put the script for the url destination in the 'Destination and Emails' section is that I have 4 of these buttons, each of which needs to go to a different url if/when clicked. Here's sort of the code I need to use- does anyone know how to incorporate the redirect script into the button so it goes to that destination after the form submits? Many thanks- <div style="text-align: center;"> <input class= "cb_custom_btn" type="submit" value="Activate Product" /> <script> var v_virt = "[@cbParamVirtual5]"; if(v_virt=="Annual"){ window.location.href='../page1?mstrID=[@authfield:mstrID]'; } if(v_virt=="Monthly"){ window.location.href = '../page2?mstrID=[@authfield:mstrID]'; } </script> </div>
  9. How do I hide the submit button when the data in a dropdown is blank and show when it chooses one of the two values? Currently I have a dropdown that says "Ready to place an order?" and when clicked, you have two options: "Order Now" or "Call for Payment." I want the submit button hidden until they make one or the other choices. Thank you in advance!
  10. Hello, I need to use a custom Update/Submit button (on a Details form) because I need to use rules to show/hide some required fields. If the fields are set to 'Required' they cannot be hidden using Rules. So I unchecked the 'Required' box for those fields. I am using a custom Update button (hiding in Styles the default one) so I can put checking code in before the record is Updated, to make sure those fields aren't null. I don't know exactly how to code this because the button type needs to be "button" (instead of "submit") so it will run the checking code. If neither of the fields are null then I need the button to run "submit" code. If either of the fields are blank I need an alert box to show and no "submit" code to run. 1) does anyone know how to put in an 'else' statement that changes the button type to "submit" so if fieldA and fieldB are not null it submits? 2) does anyone know how to put an 'if both FieldA AND FieldB are NOT null then "submit"? I need it to only submit if both fieldA AND fieldB are not null. I'm not sure of the syntax for that. Here's the code I'm using so far- thanks for any help. <div style="text-align: center;"> <input class= "cb_custom_btn" type="button" onclick="myFunction()" value="Check Required & Update" /> <script> function myFunction(){ var v_fielda = document.getElementById("EditRecordFieldA").value; if(!isNaN(v_fielda)) { alert("Field A is required"); } var v_fieldb = document.getElementById("EditRecordFieldB").value; if(!isNaN(v_fieldb)) { alert("Field B is required"); } --// here I need something that does "if both fieldA AND fieldB = not null then run "submit" (but do NOT run "submit" if either FieldA OR FieldB = null) //-- } </script> </div>
  11. I'm have a submission form that uses custom buttons (because of the need to show/hide Submit due to Rules) to do the Submit. I need, after submitting the new record, for the destination to go back in History a page (or two if the submit refresh logs the form as a page in History). I can't get the code to run in the Destinations wizard, using Message and html editor disabled. Here's what I have so far: basically the data submits correctly and a new record is created but I get no redirection to previous url. <SCRIPT LANGUAGE="JavaScript"> function goBack() { window.history.go(-1); } document.getElementById("caspioform").onsubmit = goBack; </script> The other option I tried was to put the js in the html block with the custom button for Submit. It does run the 'go back' code but the new record doesn't actually get submitted. So it's either the 1st choice with record submitted and no back-redirect or the 2nd choice with no record submitted and back-redirect working. If someone could clarify how to get the actual 'submit' AND the 'back-redirect' to work that'd be really great. Here's the custom button code in the html block, if that helps: <div style="text-align: center;"><input class="cb_custom_btn" type="submit" onclick="goBack()" value="SUBMIT" /> <SCRIPT LANGUAGE="JavaScript"> function goBack() { window.history.go(); } document.getElementById("caspioform").onsubmit = goBack; </script> </div>
  12. abitaquest

    Button gradients

    I've been customizing my default stylesheet for accessibility. I've modified my buttons so that they're very readable on desktops using all browsers I've tried. But when I load my forms from my phone, the buttons take on a weird gradient that gives a rounded appearance to the button. This is not what I want, as it's much less legible. Anyone know how to turn off this default for mobile devices ... or at least where the style is coming from? I don't see it anywhere in my CSS. Thanks!
  13. I have 1 dropdown followed by 4 cascading dropdowns lined up horizontally on a submission page. When the submit button is selected the results come out fine, but all of the dropdowns are reset. I don't want the dropdowns to reset when the submit button is selected, but would like to have a separate reset button so the user can reset the dropdowns when desired. Also, the submit button is below the dropdowns and I want to put it and the reset button on the same horizonal line and to the right of the dropdowns. I appreciate any help. Thanks
  14. I have a form that has two embedded forms (iframe datapage deployment) First subform is a submission form and the second a single record update form. I have a javascript function that is run by clicking on a button in the parent form that randomly selects a record whose parameters are then passed to both of the embedded forms. After the action is completed, I want to submit both of the embedded forms, without submitting or reloading the parent form, because the action can potentially be repeated. I have tried several options, but can't get the submit to work. Below is my javascript funtion as I have it now. The names of my iframe forms are Form a - embeddedsubmitform Form b - embeddedupdateform Any help would be greatly appreciated. Thank you <script> function getemprec() { var radget = document.forms[0].elements["cbParamVirtual5"]; //this is radio button that will determine the number of times the function will be run for (var i=0; i<radget.length;i++) { if(radget.checked) { var S1 = radget.value; } } var S2 = Number(S1); var E1 = document.getElementsByName("cbParamVirtual4")[0].length; //this returns a list of total records in the system var E2 = Number(E1); var E3 = E2/S2; var S3 = Number(E3); document.getElementById("InsertRecordNumber_of_Screens").value = S3; var scrtyp = document.getElementById("InsertRecordScreening_type").value; var scrdate = document.getElementById("InsertRecordDate_of_Screens").value; var T1 = document.getElementsByName("InsertRecordEmployees")[0].length; var n1 = Number(T1); var n2 = n1 - 1; var numb = Math.floor(Math.random()*n2); var numb2 = Number(numb); document.getElementsByName("InsertRecordEmployees")[0].selectedIndex = numb2; var reclist = document.getElementsByName("InsertRecordEmployees")[0]; var recvalue = reclist.options[reclist.selectedIndex].value; document.getElementById("cbParamVirtual2").value = recvalue; document.getElementById("embeddedsubmitform").src ='../pages/submit.html?SelEmp_Rec_ID='+recvalue+"&Screen_Type="+scrtyp; document.getElementById("embeddedupdateform").src ='../pages/update.html?DS_Emp_Rec_ID='+ recvalue+"&DS_date="+scrdate; document.getElementsByName("embeddedsubmitform").submit(); document.getElementsByName("embeddedupdateform").update(); } </script>
  15. I have a form, and I would like to submit the form by clicking a link instead of a submit button, and then having the form redirect to a single record update page while passing a parameter (the unique ID generated from the form), Any resources I could refer to be able to do that? Thank you for your help.
  16. Good morning, I am making a submission form that will be arranged in one long line. I would really prefer to have the submit button be on the same line as the text fields as there is a large report below it and the more space I have to work with the better. I attempted to add the CSS element Float: right to the button in the layout section of the applied style to no avail. Any and all help is much appreciated.
  17. Hello, We have embedded a Submission Form into our website and are in the testing phase. Everything appears to be working other than when a form is submitted with errors. For example, if not all required fields are entered, after submitting I am directed to the home page of my website instead of seeing the error message. This was working previously, in the Preview function and on a different website so I'm not sure what has changed. Thank you.
  18. https://b3.caspio.com/dp.asp?AppKey=c82f10009869d02257544bb683f1 In the sample page above I have a code to increment a number on submission but if the data for required fields are not entered the function is still being called. How can I only call the function if the submission goes through???
  19. How do I, on a Submission Form, show a successful submission message when using 'Same Form' for the destination? I am using for these particular forms the iFrame deployment in a modal. When 'Same Form' is clicked it does not close the modal but flashes the form (submits data) and then stays open. This would be ok if I can at least show a 'successful submission' message so the user knows their data was saved. The problem is that if I use Close Form the modal stays open- I can't close the modal via the Caspio datapage.
  20. I'm using a details page to update a record in my table & on the details page are a variety of calculations that i've written to calculate "onchange" on the page. Things are working properly, however now i'd like to disable the sumbit button if "Field_A" & "Field_B" do not match. To add a layer to this, i'd like to know how to use an HTML block as one of these fields since it's where the calculation happens and i'd also like to know if i can have multiple criteria that disable the submit button. I'm thinking that I need to assign a field name to the HTML block, however I don't know how to do that unfortunately. How would the code for this situation be written? "Field_A" value must equal "HTML block 22" in order for the submit button to be enabled OR "Field_A" value must equal "HTML block 22" AND "Field_B" value must equal "Field_C" for the submit button to be enabled I saw a topic on this question if a value is greater than 0, however nothing on how to change the 0 to a comparison between 2 fields. Thanks!
×
×
  • Create New...