Skip to content

Commit e1122d6

Browse files
committed
gw-populate-date.php: Fixed an issue where dynamic population did not trigger date population.
1 parent 4a5f1c8 commit e1122d6

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

gravity-forms/gw-populate-date.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,17 @@ public static function output_script() {
281281

282282
( function( $ ) {
283283

284+
if ( ! String.prototype.format ) {
285+
String.prototype.format = function() {
286+
var args = arguments;
287+
return this.replace(/{(\d+)}/g, function( match, number ) {
288+
return typeof args[number] !== 'undefined'
289+
? args[number]
290+
: match;
291+
});
292+
};
293+
}
294+
284295
window.GWPopulateDate = function( args ) {
285296

286297
var self = this;

0 commit comments

Comments
 (0)