Streaming live at 10am (PST)

Use the input from the form for cms


  1. is it possible to get the input from a user that fill a form and create a new cms record automatically?
  2. is it possible to get the input from a user that fill a form and use it to a link of a button, for example, the user fills a phone number and when he submitted it will take him to the link will be sms://[phone number the entered]


I think the answer you are looking for is in this video it is within the first 18 minutes. "

for you second question i dont have an answer but i will let you know when i think of one :slight_smile:

1 Like

thanks, do you know if it will work with image upload?

i think so,
When the cms api was just new i tried a few things but not sure if images are supported but i think so :smiley:
Good luck

Tonight i will ask my wife if she has a sollution for you phone number question :slight_smile:

you are awsome! thanks

Hi @argogiant
any solution?

('.buttonclass').on('click, touchstart', function(){ var telNr = (’#telNrinputfield’).val();
window.location = ‘sms://’+telNr;

you’ll need to add jquery:

Yes, but you would likely need some back end logic. You could have a form submission webhook that triggers a new CMS item to be created using the CMS api. This would definitely require some development skills.

If I understand your question correctly, yes. If the place that you need to display the telephone number is on the same page as the form, then you could just get the input’s value with document.getElementById('phoneInput').value , otherwise if it’s on a second page you would probably need to pass the value over by using a URL query string like

Hope that helps.

1 Like

where do I need to put this row? where do I write it?
sorry for my poor knowledge on development (and my English haha)

This is custom code, so you would need to wrap it in script tags and put in somewhere in your site (like a script embed or in the page footer code).

When someone clicks the form submit button, this example function grabs the input value and prepopulates another text input with its value:

    document.getElementById('submitButton').addEventListener('click', prepopulateField);

    function prepopulateField() {
        var phoneNumber = document.getElementById('phoneInput').value;
        var newField = document.getElementById('newField');
        newField.value = phoneNumber;

document.getElementByID('submitButton') is referencing the form submit button. You need to make sure that you set element IDs within the Webflow designer for this to work. I made a video series on setting up user auth with a Webflow site where I show how to do this, you might find it useful.



Dude, you saved me! Thanks