Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Landing Page: Need to alter the format of the custom fields in Editor section

Avatar

Avatar
Validate 1
MVP
Anita_p
MVP

Likes

116 likes

Total Posts

118 posts

Correct Reply

28 solutions
Top badges earned
Validate 1
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile

Avatar
Validate 1
MVP
Anita_p
MVP

Likes

116 likes

Total Posts

118 posts

Correct Reply

28 solutions
Top badges earned
Validate 1
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile
Anita_p
MVP

15-07-2019

Hi ,

I am working upon a landing page and I have a custom field in the recipient schema of type DateTime .

During run time I want the value to be displayed in DD Month YYYY.

I have tried changing the format using JS but somehow the landing page does not allow to alter anything the values visible at the Editor section of the landing page

The same works all fine which is not shown in the editor.

PFB screenshots for your reference:

Screen Shot 2019-07-16 at 9.58.43 am.png

in the source code, it appears as below and I tried using the variable here to have it displayed in the required format but no luck.

Screen Shot 2019-07-16 at 10.04.46 am.png

Any suggestions what changes I need to do in the above code ?

Thanks in advance.

Regards,

Anita

Replies

Avatar

Avatar
Contributor
MVP
wodnicki
MVP

Likes

928 likes

Total Posts

1,061 posts

Correct Reply

495 solutions
Top badges earned
Contributor
Shape 1
Give Back 100
Give Back 50
Give Back 25
View profile

Avatar
Contributor
MVP
wodnicki
MVP

Likes

928 likes

Total Posts

1,061 posts

Correct Reply

495 solutions
Top badges earned
Contributor
Shape 1
Give Back 100
Give Back 50
Give Back 25
View profile
wodnicki
MVP

18-07-2019

Hi,

Put this at the bottom of the page source, where #id is the id value of the date node, here 'span156....':

<script type="text/javascript">// <![CDATA[

$(function(){

  $('#id').val(new Date($('#id').val().replace(' ', 'T')).toLocaleString('en-US', {year:'numeric', month:'long', day:'numeric'}));

})

// ]]></script>

Thanks,

-Jon

Avatar

Avatar
Validate 1
MVP
Anita_p
MVP

Likes

116 likes

Total Posts

118 posts

Correct Reply

28 solutions
Top badges earned
Validate 1
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile

Avatar
Validate 1
MVP
Anita_p
MVP

Likes

116 likes

Total Posts

118 posts

Correct Reply

28 solutions
Top badges earned
Validate 1
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile
Anita_p
MVP

21-07-2019

Thanks Jon.  Appreciate your response.

I tried using some other method and it worked.

Regards,

Anita