Jump to content

cldb2016

Members
  • Content Count

    6
  • Joined

  • Last visited

  1. I originally asked for help with this problem back in 2016 and I received a reply that worked at the time. But now for some reason it does not work anymore and I could use some help. I have a telephone number formatted as follows: +17035551212 and it is in a field named [mobilenumber] I want to remove the first two characters so the number looks like: 7035551212 and then insert this number in a field called [mobilenumberten]. For some reason I just cannot get it to work anymore on my submission form datapage. Any suggestions would be helpful. Thanks in advance.
  2. Hi, I tried inserting the code above and it did not work. The first thing I did was to remove the calculated field containing the old code above. Then I created a new HTML block and I clicked on source and inserted the code you provided. I then input a user that had not been rated yet and clicked enter and received the same results. The image for zero stars (URL_11_0) did not display. I tried to do this different ways and I disabled the HTML editor, but no luck. Do you have any other suggestions? Thanks
  3. I have a datapage that allows users to view the ratings other users by entering the users user name. User ratings range from 0 stars to 5 stars. This page receives parameter telling it how many stars the users has. So if the user has a rating of 1.5 stars the page will display an image showing 1.5 stars by referencing the fourth line of the code below [@app:URL_1_5]. However if the user enters a username that has never received a rating or if the input does not fall within the range below (0-5) it should call a graphic that shows 5 grayed out stars which represents 0. (see line 12 which is supposed to call grayed out 5 star image). I'm not sure what I'm doing wrong and I am in need of a little assistance. All of this takes place in a calculated field. -Thanks CASE WHEN [@calcfield:5]> 0 AND [@calcfield:5] <= .5 THEN '[@app:URL_0_5]' WHEN [@calcfield:5]> .5 AND [@calcfield:5] <= 1.0 THEN '[@app:URL_1_0]' WHEN [@calcfield:5]> 1.0 AND [@calcfield:5] <= 1.5 THEN '[@app:URL_1_5]' WHEN [@calcfield:5]> 1.5 AND [@calcfield:5] <= 2.0 THEN '[@app:URL_2_0]' WHEN [@calcfield:5]> 2.0 AND [@calcfield:5] <= 2.5 THEN '[@app:URL_2_5]' WHEN [@calcfield:5]> 2.5 AND [@calcfield:5] <= 3.0 THEN '[@app:URL_3_0]' WHEN [@calcfield:5]> 3.0 AND [@calcfield:5] <= 3.5 THEN '[@app:URL_3_5]' WHEN [@calcfield:5]> 3.5 AND [@calcfield:5] <= 4.0 THEN '[@app:URL_4_0]' WHEN [@calcfield:5]> 4.0 AND [@calcfield:5] <= 4.5 THEN '[@app:URL_4_5]' WHEN [@calcfield:5]> 4.5 AND [@calcfield:5] <= 5.0 THEN '[@app:URL_5_0]' ELSE '[@app:URL_11_0]' END
  4. I managed to come up with this script, but it does not work. Any suggestions would be helpful. I also added removing the last two characters of the number to the script. Fields "mobilenumber" is in the format of +17035551212, "mobilenumberten" 7035551212, and "mobilenumbereight" 70355512. <SCRIPT LANGUAGE="JavaScript"> function rewriteMobileNumber() { var mobilenumber,mobilenumberten,mobilenumbereight; mobilenumber = document.getElementById("mobilenumber").value; mobilenumberten = mobilenumber.substring(2); document.getElementById("mobilenumberten").value = mobilenumberten; } document.getElementById("caspioform").onsubmit=rewriteMobileNumber; </SCRIPT>
  5. I created a submission form datapage where a user enters there telephone number in the following format +17035551212 (+ / country code / area code / seven digit number). I am trying to find a java script or some other way to remove the first two characters of this string and insert it into another field in the same table. The resulting number should be 7035551212 Any help would be appreciated. I am not a java expert, but I know enough to modify and insert basic scripts.
×
×
  • Create New...