Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

199
Vistas
Current user email id not updated proper format

i have created web app form and collecting current user email id.i have checked console.log emp. but email id showing : as drop down as single word. i want consolidate email id.like xyz@gmail.com please help me

function doGet(e) {
    var ss = SpreadsheetApp.getActiveSpreadsheet();
    var emp = Session.getActiveUser().getEmail();
    var aux = ss.getSheetByName("AUX").getRange('A2:A').getDisplayValues().map(r => r[0]).filter(String);
    var htmls = HtmlService.createTemplateFromFile('form');
    htmls.emp = emp; htmls.aux = aux;
    return htmls.evaluate();
    }
<div class="w3-container ">
  
        <div class="w3-row w3-padding">
            <label for="employee">Employee</label>
            <select class="w3-select" id="employee">
                <option disabled selected>Select Employee</option>
                <? for(let i=[0];i<emp.length;i++){ ?>
                <option>
                    <?= emp[i]; ?>
                </option>
                <? }?>
            </select>
        </div>
        <div class="w3-row w3-padding">
            <label for="aux">Reason Code</label>
            <select class="w3-select" id="aux">
                <option disabled selected>Select Reason Code</option>
                <? for(let i=0;i<aux.length;i++){ ?>
                <option>
                    <?= aux[i]; ?>
                </option>
                <? }?>
            </select>
        </div>

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

you need make question more clear, if only one word is appearing it means php considering your variable as array

 $varName = "empEmail@gmail.com";

echo $varName[0]; //it will print "e" only
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda