Jump to content

Mathilda

Caspio Rockstar
  • Content Count

    464
  • Joined

  • Last visited

  • Days Won

    49

Posts posted by Mathilda

  1. On 6/25/2017 at 2:43 PM, Heineperson said:

    Hello,

    I would like to use HTML blocks to organize my fields on a list report embedded in a Wordpress site:

    http://dev-saveplants.pantheonsite.io/national-collection/plant-search/plant-profile/?CPCNum=3

    I would like to reduce the space between the HTML blocks and the data fields (see the words "nomenclature" and "Conservation Status" in top section under "Plant Profile"). I have tried to create a custom Caspio Style with altered the padding and margins, but I am unsure exactly what layout parameters I should be changing, and I also wonder if my wordpress theme might overwrite these changes.

    Any advice you have for a novice would be greatly appreciated.

    Hello,

    As far as I understand, you need to reduce space between the submit button and header of the record try using     padding: 0px 12px; instead of padding: 10px 12px; for the  .cbResultSetPanelDataContainer class

     

  2. On 6/2/2017 at 11:08 AM, roattw said:

    Hopefully I can explain this.

    Three Fields: 

    A= Yes/No

    B= Dropdown choice with an "other" option

    C = Other field if OTHER chosen in dropdown B.

    If A = No, hide B and C

    Having trouble getting B and C to appear/hide based on values because I think you can only use a rule on one field at  a time.

    Example:

    A = Male? (Y/N) , if Yes show B, keep C hidden still.

    B = Dropdown with "other" option.  If other chosen, then show C, the other text field.

    But the rule stating to hide B and C does not allow me to apply another Rule for C.  I can get B and C hidden or shown at same time only.  Hope that makes sense.

    Way around this?

     

    You need to define all the criteria when you hide a specific field. It's allowed using fields several times in criteria.

    E.g:

    rule 1: when a = "no" hide B

    rule 2: when a="no" OR B is not equal 'other' - hide C

    This way you will get more flexibility in rules.

  3. On 6/12/2017 at 7:03 PM, Scott said:

    I have a text field for entering a mobile number on a submit Data Page. I would like to validate the mobile entered to be in the format 61xxxxxxxxx.

    Reason is I pass this number through zapper to send SMS updates in twilio to new members with their details.

    How can I validate the field on submission. I have already set the field to repeat for confirmation and a placeholder in the format I require the mobile, but people still add as for example 0456888222

     

     

    Hi Scott,

    I replied to this topic. You request is very similar, you just need to set your condition

    Hope that helps

  4. On 6/20/2017 at 8:24 PM, DavidM said:

    Hi - I am new to Caspio and cannot work out what I think should be simple.  I need to select a data row and return its related rows in another data page.  So essentially a Parent/Child form.

    Not sure I am going about it the correct way.  I have a datapage report which shows all customers for a particular consultant who is logged in - this works fine. 

    I have then added in a HTML block field that has a hyperlink as follows : <a href="https://c0aba431.caspio.com/dp.asp?AppKey=92a950009c9221fb4137448f810a&amp;CustomerID=[@field:CustomerID]">Select</a>

    This also works as it opens a new page that shows the associated data.

    My problem is it opens in a new window - I want it to simply update some embedded code which is on the same page as the customer listing.

    Should I be doing it a different way? I have found the examples of how to pass the data to a new page etc. but I simply want to be able to select a data row and have it update the childs datapage data upon the parent selection.

    Any assistance is appreciated.

    Hi,

    You may update data in a popup window if it works for you. Popup windows opens within the parent page

  5. On 6/2/2017 at 7:16 AM, NikkiC said:

    Hi there,

    Just wondering if anyone knows whether it's possible to drag items in a table to reorder them in Caspio datapages?  I have a report datapage of a list of projects, and wish to be able to reposition each entry based on priority.

    Any thoughts?

    Many thanks

    Nikki

    Hi Nikki,

    Do you have "priority" field in your data source? If you don't have, you may add an autonumber field to your table (since you have the correct order in the table), then enable sorting on that field on a results page. 

    Hope that helps! Cheers!

  6. 15 hours ago, lmooring said:

    Hi, Sorry for the confusion. I retyped it several times before posting trying to make it clear.

    I've reread the specs and discussed with the business owner. This is how I now understand it and yes, it is validation.

     

    IF PACKTYPE = "SIMPLE"

    THEN SIMPLEUNIT should be EQUAL to "1"

     

    IF PACKTYPE = "COMPLEX"

    THEN COMPLEXUNIT should be >= to "2"

    I also added a condition to check that fields are not blank. You need to use your field names instead of mine.

    <SCRIPT LANGUAGE="JavaScript">
    
     function check()
     {
    var COMPLEXUNITS= parseFloat(document.getElementById("InsertRecordCOMPLEXUNITS").value);
    var SIMPLEUNIT = parseFloat(document.getElementById("InsertRecordSIMPLEUNIT").value);
    var PACKTYPE = document.getElementsByName("InsertRecordPacktype")[0].value;
       
    if( PACKTYPE =='Simple' ) {
    if (SIMPLEUNIT !=1 || typeof SIMPLEUNIT  == 'undefined' || !SIMPLEUNIT || SIMPLEUNIT.length  === 0 || SIMPLEUNIT  === "" || !/[^\s]/.test(SIMPLEUNIT) || /^\s*$/.test(SIMPLEUNIT) || SIMPLEUNIT.replace(/\s/g,"") === "" )
    {
    window.alert("Value in the SIMPLEUNIT field should be equal 1");
    return false;
    }
    }
    else if (PACKTYPE =='Complex'){
    
    if ( COMPLEXUNITS <2 || typeof COMPLEXUNITS == 'undefined' || !COMPLEXUNITS  || COMPLEXUNITS.length  === 0 || COMPLEXUNITS  === "" || !/[^\s]/.test(COMPLEXUNITS ) || /^\s*$/.test(COMPLEXUNITS ) || COMPLEXUNITS .replace(/\s/g,"") === "")
    {
     window.alert("Value in the COMPLEXUNITS field should be grater or equal  2");
    return false;
    }
    }
    }
     document.getElementById("caspioform").onsubmit=check;
    
    </SCRIPT>

     

  7. On 6/21/2017 at 8:53 AM, lmooring said:

    I need to create an alert on a submission form where,

     

    If the drop down box PACKTYPE is = "Simple" then if text field SIMPLEUNIT not equal to 1

    Else if PACKTYPE is = "Complex" then a second text field COMPLEXUNITS must be =<2 or greater than 1, which ever is easier.

     

    I would like to include alert messages if possible. I am not sure how to write this. I am sure it is simple but I am not familiar enough and not in submission forms. I've only seen items for reports.

     

    Any help is appreciated!

    Hi,

    I'm afraid that the condition is not clear to me.

    if  PACKTYPE is = "Simple"  then you need to check that  field SIMPLEUNIT not equal to 1 ? Does it mean that you allow all other values except 1?

     if PACKTYPE is = "Complex" then you need to check that a value in the second text field COMPLEXUNITS is between 1 and 2, correct ?

    So, you just need to validate (not assign) values in the SIMPLEUNIT  and COMPLEXUNITS fields. 

  8. On 6/22/2017 at 0:51 PM, mdav20 said:

    I have the following code to automatically check a yes/no if there is a value in a field.  It works when I preview it in Caspio but when it's deployed to my Weebly site and live its not working.  Any ideas?

     

     

    Perhaps script executes before the datapage is loaded. Try changing the first line of code:

    window.onload = function fb()

  9. On 6/16/2017 at 5:02 AM, logistics said:

    Hello,

     

    I have a submission form that requests users to select a value in a drop-down.

    I would like to use the selected value to look up an email address, based on this value, in a different table, and populate a virtual field with that email address.

    I would then like to use the value in that virtual field to send a submission notification.

     

    How can I achieve this? I cannot see how to load a parameter from another table based on the value of a field.

    Any help would be much appreciated.

     

    Thanks,
    Julien

    Hi Julien, 

    It seems that you just need to use cascading fields. You can use different data sources for parent and child fields

     

  10. On 6/20/2017 at 6:15 PM, Smashley said:

    I am trying to track warnings given to company employees. It's a three-strikes-and-you're-out situation.

    I originally created a field called "warning_level" in which you could select a 1, 2, or a 3.

    But now I'm wondering if it's possible to automatically calculate/count how many warnings have been submitted for each employee.

    And also limit submissions to three per employee.

    Additionally, warnings are meant to expire after one year. Is it possible to calculate the age of a submission and automatically make it inactive, and then prevent it from being included in the count?

    Thanks in advance for your help!

    I wonder who sets warning point? Is it a specific employee or you need to do that automatically after a specific action?

    Where do you store warning points? In users table or you have a separate table?

    Conditions which you described can be done in a view, however exact criteria depends on the current workflow.

    You may also have a look at this solution which should be close to what you need

  11. 14 hours ago, lupacexi said:

    Hello,

    How to show last updated record in a Form / Single Record Udate

     

    Thanks!

    I have a solution for that, however you would need to edit record on a details page instead of update form

    Create a tabular report DataPage  and Change the default sort order to timestamp field from the dropdown (make is Z to A) for results page. Then change Records per page to 1. After that go to Advanced tab, select radio button for total records returned and type 1. Then enable Details page and check box for "Always skip results page when only one record found" 

    This way you will filter only one record which is the last updated ad edit data through details page

  12. Just now, Mylene said:

    Hi,

    I need to display needed image in html block on the results page depending on a value in a field.

    I placed files into app parameters, however, it seems that I cannot create correct syntax.

    If someone faced the same challenge, please help!

    I have a solution for this case. 

    <script>
    
    var x = '[@field:field_with_values]';
    if (x==100){
    document.write('<img  src="[@app:img1/]" style="width: 415px; height: 566px; margin: 1px;" />');
    }
    else{
    document.write('<img  src="[@app:img2/]" style="width: 415px; height: 566px; margin: 1px;" />');
    }
    
    </script>

    In my script:

     [@field:check_for_image] - field which is used for the condition.

    [@app:img1/] - is the first image

    [@app:img2/] - is the second image

    Image 1 appears when field with values=100, in other cases appears image2

    Hope that helps :)

  13. 7 hours ago, jasonphillips said:

    How do I create recurring events? Most of the events we create will be recurring and I am not sure how to do this.

    Which recurring events do you mean? Can you describe an example?

    If you mean schedule sending emails - this kind of triggers can be created only on the server side. You may ask them about triggers 

     

  14. 9 hours ago, DaeBo said:

    It seems that pace.js is being recommended a lot, but how does one actually use it?

    http://github.hubspot.com/pace/docs/welcome/

    I use the following code in the header

    <style>
    #loader {
        border: 16px solid #f3f3f3; /* Light grey */
        border-top: 16px solid #3498db; /* Blue */
        border-radius: 50%;
        width: 30px;
        height: 30px;
        animation: spin 2s linear infinite;
    }
    
    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }
    </style>
    
    
    <div id="loader"></div>

    And the following code in the footer:

    <script>
    window.onload=function(){
    
    var x = document.getElementById("loader").style.display = "none";
    }
    </script>

    Works fine on my report with 4000 records. Loading circle disappears once the datapage is fully loaded

    Hope that helps

  15. On 6/2/2017 at 6:10 PM, FinWell said:

    Hi,

    I am updating an html block in a datapage form.  

    I tried using this code and tested that the logic works with regular text.  But whenever it tries to write the hyperlink, it displays nothing instead.  Thanks for any help.

    <script language="javascript">
    var samp='[@field:Table_Sample]';
    if (samp.length>0)
    {var str = "New Record";
    var result = str.link("https://www.sample.com");}
    else
    {samp = "Update Record"
    document.write(samp);}
    </script>

     

    Hi,

    I edited your script a little bit. Try using the following code:

    <p id="demo"></p>
    <script language="javascript">
    window.onload=function my_func(){
    var samp='[@field:Table_Sample]';
    if (samp.length>0)
    { 
    var str = "New Record";
    var result = str.link("https://www.sample.com");
    
     document.getElementById("demo").innerHTML = result;}
    
    else
    {samp = "Update Record";
     document.getElementById("demo").innerHTML=samp;}
    }
    </script>

     

  16. On 6/10/2017 at 6:32 AM, jwood9393 said:

    I followed the instructions in the Caspio Online Help Center article "Adding a Logout Link", however am having issues. When a logged in user clicks the "Logout" link, a "File Not Found (404 error)" message comes up. I tried both having the "logout destination" remain as the default "Same Page" and the same 404 error pops up when the Logout button is clicked. I also tried the "Go to a new page" option and used the home page of my website as the URL, but the same 404 error pops up. I should mention, the completed DataPage is deployed using the "<Embed>" option - the code is copied and pasted into an HTML box on my GoDaddy Website Builder application. Everything works seamlessly up until the logout button - even on my live website (created with the GoDaddy Website Builder), users can enter their Username & Password successfully, view the datapage as I set it up, but the Logout button redirects them to the 404 error page. Very frustrating - any help would be greatly appreciated. Thanks!

    Hi, can you please show the html code of the logout link?

  17. On 6/5/2017 at 8:20 AM, JenaSmithWIM said:

     I would like to add an option for users to populate mailing labels (Avery 5160) from inside a search and report datapage. Caspio allows me the option to let users download into a csv file, but right next to that I would like to put a Mailing Labels button and have the populate based on the results of their search form using the address data that is in the results. Caspio doesn't have this feature so I thought I would see if anyone else has built that in.  Thanks

    You may contact them, I suppose they will be able to implement that

  18. 10 hours ago, DaeBo said:

    I am using a search and report DataPage to display a user's profile photo until landing on my Dashboard page. I would like the photo to appear as a circle (just like our profile photo for this forum in the upper-right corner). Any idea on how to do that? I also want the "Welcome, Myles" to be centered vertically to the image.

     

    Screenshot (143).png

    As far as I can see, forum's profile photo has the following attribute, which you may try using: border-radius: 45px;

    You need to define that for the img element.

    Regarding placing text in the middle, the following attribute should do the trick:

    vertical-align: middle;
  19. On 5/15/2017 at 9:13 AM, Farnsbarnes said:

    I'm normalising a large Table which can extend to 3-4 million rows.  One of the fields is 'Year'  (eg '2017').   There are up to 80 different years in the database and obviously many are repeated many times,  Is it worth indexing  this field?

    I can make a table with a primary key and the related year, such as  y1 = 2000,  y2 = 2001, y3 = 2002 and so on, then relate the primary key to year field in the main Table.    I'm just wondering whether all this fuss for so little is worthwhile.  Is it going to make a performance improvement?  Or should I be doing this a completely different way.

    Thanks for any advice

    If you'd like to normalize the database, according to the the 3rd form in database normalization, repeated values should be referenced with a foreign key, therefore if you have time I would recommend doing that. It will increase performance.

  20. On 5/26/2017 at 10:04 AM, Kennylj24 said:

    A few updates a go Caspio added list creation. This feature is exactly what I need. I am attempting to change text into a list when doing a table design. The options will all be exactly the same. I don't want to lose the old data and if possible I don't want to have to change a multitude of data pages.  

    As far as I know, it's not possible to convert any datatype to string. It's a new datatype and hope conversion capability will be added soon.

  21. On 6/12/2017 at 2:52 PM, cnelson67 said:

    Hi,

    I'm new to Caspio. Creating a registration form for an event coming up in September.

    When the user goes to registration page, this is what I need to happen:

    1. Name

    2. Company

    3. Title

    4. Company

    5. Will you be attending? (if user selects no, then they just submit. If they select yes, the rest of the form shows up)

    6. Will you join us for the reception dinner on Wednesday, September 20? (if user selects no. on to next question. If they select YES, I want the 4 choices for the meal to popup and the user has to choose one.)

     

    This is where I'm having issues.

    Here is the url to the form as it currently stands.

    Thanks for any help you can offer.

    Hi, I would recommend using rules to hide sections. Add new sections and place  field6 and others in different sections.

    An example of the rule: when field 5 equal to No (or unchecked) hide section with field#6

    You may find more info here

  22. 11 hours ago, DaeBo said:

    Hi Mathilda,

    Thank you for the script. It worked for me as well. However, the script is only showing on the first page of results and when I click to the next page of results, it doesn't show. Do you know why?

     

    Screenshot (135).png

    Screenshot (136).png

    Hi, I'm glad that it works for you as well :)

    Try disabling AJAX on your report, it should helps. You can do that on 'result page options' screen

    Hope that helps

  23. Hi, You may use the following script:

    <SCRIPT LANGUAGE="JavaScript">
    
    function tel()
    {
    var message = document.getElementById("InsertRecordPhone").value; 
    
    document.getElementById("InsertRecordPhone").value = (message.replace(/[^\d]/g, '')); 
    
    var message1 = document.getElementById("InsertRecordPhone").value;
    var tel =message1.substring(0,3);
    if (tel!='031'){
    alert("Please enter phone number which starts from 031");
    return false;
    }
    
    }
    
    document.getElementById("caspioform").onsubmit=tel;
    </SCRIPT>

     

    This function will prevent form from submitting if  phone starts from other numbers. Don't forget to enter your field name instead of mine.

  24. On 5/29/2017 at 8:33 AM, TonyK said:

    Hi,

    I'm using embedded  Javascript for deploying code.   However after running a datapage on the site, in the chrome browser it shows my subaccount.caspio.com.   It says waiting for subdomain.caspio.com.

    From a white label perspective, a user would be able to tell that we are using Caspio.    Its fast now, but at times it will stick on it for 2 or 3 seconds.    

    Outside of going on-premise, has anyone had any solutions for this?

     

    Thank you!

    Hi,

    I've never seen "waiting for ..." message, do you have a lot of Java Script on your page? I suppose that the webpage loads too slow and it may be the reason. IMHO if user is skilled enough, you won't be able to hide what you deployed on webpage since it's easy to find out that when you inspect the webpage of check the source code.

    You may have a look at this solution or get data via REST API which should let you hide which system you use.

×
×
  • Create New...