Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

202
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!