How to show the data entered in inputs and dropdowns through a submit with php or javascript?

1

Very good people from the forum

What I would like to do, which I do not have the slightest idea in this language, is to show the data that is entered in certain inputs and dropdowns in a secondary screen, so to speak, through a submit so that the user can have a summary of the data that was filled in the inputs and dropdowns.

I have read that what could be through ajax, method = GET but I am new to this and I do not understand it completely.

Any help that is given to me I thank you in advance.

Here I leave an input and a dropdwon that I would like to show in the submit:

  <div class="input-field col s12 m10 l10">
                    <i class="material-icons prefix">attach_money</i>
                    <input  id="MontoPresupuestado" name="MontoPresupuestado" type="number" class="validate" required title="Del Monto Presupuestado se Define Automaticamente la Modalidad/Metodología del Proceso" onchange="LoadValues()">
                    <label for="DescripcionAdquisicion">Monto Presupuestado US$</label>
                </div>
                
                
                  <div class="row">
              <div class="input-field col s12 m10 l10">

              <select class="browser-default" id="ModalidadProceso" name="ModalidadProceso">
                <option value="" disabled selected>Seleccione la Modalidad del Proceso</option>
                <option value="1">Pre-calificación</option>
                <option value="2">Co-Calificación</option>
              </select>
            </div>
            </div>
    
asked by Rodriguez1222 07.03.2018 в 19:09
source

3 answers

0

What you can do is assign an id to each input and when the user finishes filling the form you can bring the values entered in each input with Jquery and show them in a modal, example:

<input type="text" name="nombre" id="nombre" class="nombre" value="">

$("#nombre").val()

This way you already have the value entered in the name field, it would only be shown at the end of the form, capturing each value of the fields you have.

    
answered by 07.03.2018 в 22:49
0

Indeed, the easiest way for your case is using Jquery.

Stores the value of the input in a variable.

html

   <button type="button" id="btn_prueba" class="btn btn-primary" onclick="funcionprueba()">Siguiente acción</button>

jquery

 function funcionprueba(){

 var MontoPresupuestado, ModalidadProceso;
 MontoPresupuestado = $('#MontoPresupuestado').val();
 ModalidadProceso = $('#ModalidadProceso').val();
 //Aqui todo lo que deseas realizar con el submit
 }

Greetings.

    
answered by 08.03.2018 в 00:58
0

in php I think it's much simpler, put everything in a form with the action you send it to the sheet you want, do not forget to put an input submit or button according to the php you use and collect the data with post or gest as you put it in the method in the sheet where you sent it and put the variable where you want. link

    
answered by 08.03.2018 в 13:07