Need Assistance with Data Submission and updating Contact Information for User Input Boxes

Hi, I’m looking for some code that will allow users to input their email and zip code into data entry boxes, and allow them to submit their information using either the enter key or by pressing the blue arrow in the example below. I would appreciate any assistance or advice. Thanks!

Hello,

First, let me direct you to our articles regarding forms and user input:
https://support.wix.com/en/wix-code/user-input

In a nutshell:

  1. You need to add a dataset to the page where the form lives, and configure the dataset to write to the collection which you want to keep user info.
  2. Than connect the input elements to the appropriate fields of the dataset.
  3. Connect the arrow button to the dataset’s “submit/save” action.
  4. That’ll make the UI elements work as you described.

Regarding also saving the data when the enter key is pressed, please refer to the following api documentation regarding keyboard events: KeyboardEvent - Velo API Reference - Wix.com
It explains how to write a function that will be executed when a certain key is pressed.
Inside the function, you should call the dataset’s “save” method (wix-dataset - Velo API Reference - Wix.com)

Good luck ,and let us know if you need further help.