Drop Down for the list of zip codes in WebApp for adobe campaign classic | Community
Skip to main content
Level 3
November 23, 2020
Solved

Drop Down for the list of zip codes in WebApp for adobe campaign classic

  • November 23, 2020
  • 4 replies
  • 2783 views

Hi Team,

 

I wanted to create a list of zipcodes in webApp in Adobe campaign classic and these zip codes are provided for the selection in the web page rather than the customers providing wrong zip codes or in valid zip codes.

 

Kindly suggest and provide me the codes if you have.

 

Thanks,

Sachin 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by ParthaSarathy

Hi @sachincs1991 ,

You can achieve this in 2 ways, either by creating enumeration for zipcode in classic and hardcoding the zipcode value in it, or hardcoding the zipcode value in HTML content in webapplication.

Eg:

<html>
<body>
  <label>Zipcode:</label>
  <select id="zipcode" name="zipcode">
    <option value="city1">600001</option>
    <option value="city2">600002</option>
    <option value="city3">600003</option>
    <option value="city4">600004</option>
  </select>
  <input type="submit">
</body>
</html>
 

Regards,

ParthaSarathy S

4 replies

ParthaSarathy
Community Advisor
ParthaSarathyCommunity AdvisorAccepted solution
Community Advisor
November 23, 2020

Hi @sachincs1991 ,

You can achieve this in 2 ways, either by creating enumeration for zipcode in classic and hardcoding the zipcode value in it, or hardcoding the zipcode value in HTML content in webapplication.

Eg:

<html>
<body>
  <label>Zipcode:</label>
  <select id="zipcode" name="zipcode">
    <option value="city1">600001</option>
    <option value="city2">600002</option>
    <option value="city3">600003</option>
    <option value="city4">600004</option>
  </select>
  <input type="submit">
</body>
</html>
 

Regards,

ParthaSarathy S

~  ParthaSarathy S~  Click here to join ADOBE CAMPAIGN USER GROUP for Quarterly In-person | Hybrid | Virtual Meetups
Level 3
November 23, 2020

Hi @parthasarathy , 

 

Thank you very much for the reply. 

 

This worked, but I am thinking still improvise it.

 

If I have 10000 zip codes it will be tough for them to do select and do so. 

 

Since zip codes are more I want give some entry in the drop down field so if I type 601 in the textbox of drop down it should show all the zip codes which starts from 601 so that customers can easily select the zip codes from the drop down.

 

Kindly suggest or help me with the code. 

 

Thanks, 

Sachin 

Manoj_Kumar
Community Advisor
Community Advisor
November 23, 2020

Hello @sachincs1991 ,

 

You can use Select 2 JS plugin to make the dropdowns searchable.

 

Here is the link to the documentation: https://select2.org/searching

 

Thank,

Manoj

Manoj  | https://themartech.pro
Level 3
November 25, 2020

Hi @_manoj_kumar_ ,

 

I have implemented as below this is only helping to select in drop down.

I need to enter the text and help based in that or can we extract the zipcodes from the schema which is already having it.

 

 

<div class="infowidth"><select name="zipcode" id="zipcode" type="text" data-nl-bindto="xpath" data-nl-xpath="@zipCode" data-nl-label="ZipCode" data-nl-ismandatory="true" placeholder="*ZipCode">
<option value="60001">60001</option>
<option value="60002">60002</option>
<option value="60003">60003</option>
<option value="60004">60004</option>
</select></div>

 

Thanks,

Sachin

Sukrity_Wadhwa
Community Manager
Community Manager
December 7, 2020

Hi @sachincs1991,

Were you able to resolve this query or do you still need more help here? Do let us know.

Thanks!

Sukrity Wadhwa
Level 3
December 8, 2020

Hi @sukrity_wadhwa ,

 

Required the exact code to make it work.

 

Thanks,

Sachin