Navigation

    APPDRAG Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular

    REMINDER

    Please be respectful of all AppDragers! Keep it really civil so that we can make the AppDrag community of builders as embracing, positive and inspiring as possible.

    How do I write my own SQL query that takes the form inputs as parameters?

    Cloud CMS (Pagebuilder, Blog, Shop, Newsletters, Code Editor)
    2
    5
    432
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • E
      Ed Low last edited by

      I've tried using

      document.getElementsByName("[name of input]")
      

      but it is unable to get the input value

      I'm also not sure what to do even if I do get the input value. Like how do I pass it into the cloud backend?

      The reason for writing my own SQL query is because I need to insert form input values into 2 separate tables.

      Wassim 1 Reply Last reply Reply Quote 0
      • Wassim
        Wassim @Ed Low last edited by

        @ed-low hi, you can use Cloud Backend inputs and write no line of JS code to call your Cloud Backend function.
        a4d04b50-d740-42cc-a1b7-7f867804e7ef-image.png

        Then on a button go to triggers => Cloud Backend => link your field to a parameter from your function

        d81819b1-c357-44cf-a081-8d41abecd216-image.png

        E 1 Reply Last reply Reply Quote 0
        • E
          Ed Low @Wassim last edited by

          @wassim Thanks for the reply. I've looked at this and tried to use the tags input but it was limited. I want the user to be able to create their own tag and the tags to be individually separated and inserted into my table.

          That would require some javascript and taking the value of the input itself right?
          For example if the tags input value is "cat, dog, ostrich, building". I want to be able to insert the 4 values as new rows into my tags table if these tags are new.

          E 1 Reply Last reply Reply Quote 0
          • E
            Ed Low @Ed Low last edited by

            @ed-low
            Also, is there a way to connect these tag values to a databsae of tag values? And if the tag is not found, one is automatically inserted?

            cc7b2166-332d-4ecc-923b-c768d2bc0e69-image.png

            Wassim 1 Reply Last reply Reply Quote 0
            • Wassim
              Wassim @Ed Low last edited by

              @ed-low you can do it using JS select 2 inputs. (but that's an HTML/JS question, not AppDrag related)

              Then you can use any source to call your Cloud API Function instead of setting a source type "field" you would use a "formula" and call a function you created to get the value of your custom input.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post