Jump to content

Search the Community

Showing results for tags 'replace form field'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • 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


Last Updated

  • Start


Filter by number of...


  • Start




Website URL






Found 1 result

  1. Hi i'm a newbie to scripting of any sorts and i have a problem i'm trying to replace a text field on a submission form based on the contents of another field (dropdown), with the contents of either of two other text fields. In essence if the contents of one field "Name_Type" equal "Muscle Group" then I want the field "Workout_Name" to equal the contents of the Muscle_Group_id field, likewise if the contents of field "Name_Type" equal "Workout_Type" then I want the field "Workout_Name" to equal the contents of the Workout_Type_id field. If neither is the case then I want the contents of the field "Workout_Name" to stay as it is. If had an attempt at scripting this which I placed in the footer of the submission datapage but without success, can anyone help? <SCRIPT LANGUAGE="JavaScript"> function replace () var name_type = document.getElementById("InsertRecordName_Type").value; var muscleG = document.getElementById("InsertRecordMuscle_Group_id").value; var workType = document.getElementById("InsertRecordWorkout_Type_id").value; var work_name = document.getElementById("InsertRecordWorkout_Name").value; if (name_type = "Muscle Group") { var Work_nameSubmit = muscleG; } else if (name_type = "Workout Type") { var Work_nameSubmit = workType; } else { var Work_nameSubmit = work_name; } document.getElementById("caspioform").onsubmit=replace; </SCRIPT>
  • Create New...