Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

195
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda