Default Value for Text Fields. - Page 2

User 348342 Photo


Registered User
24 posts

Yes - server is setup to parse php inside html. I can't share a link - this development is on a internal secure intranet.

I tried setting the value of other text fields and it works for them - but it appears the date picker clears the field on the display.
User 187934 Photo


Senior Advisor
20,190 posts

Now that you mention that I think I had the issue with another user. I'll search the forum and see if we ever found a fix.
Are you using the iframe code still wrapped by the script?
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 348342 Photo


Registered User
24 posts

if it helps: this is the code snippet:

<div class="fb-input-date">
<input name="GuestRegisterDate" class="datepicker" id="item9_date_1" required type="text"
data-hint="" value= "<?php echo($GuestRegisterDate);?>" />
<div class="fb-hint" style="color: rgb(136, 136, 136); font-style: italic; font-weight: normal;">
Today&#39;s date (yy-mm-dd) <?php echo($GuestRegisterDate);?>
</div>
</div>

The form is running inside a php program that manages the variables, $GuestRegisterDate is initialized elsewhere before the form is used.
User 187934 Photo


Senior Advisor
20,190 posts

Eric Rohloff wrote:
Now that you mention that I think I had the issue with another user. I'll search the forum and see if we ever found a fix.
Are you using the iframe code still wrapped by the script?
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 348342 Photo


Registered User
24 posts

No I am not using the iframe wrapper. My php wrapper manages a full CRUD scree setup so i can do user operations on a mysql database. - i use the formbuilder to build the forms, then import the html code in the the php wrapper. I have done this successfully with other fields - this is the first time I used the date field and I can see that it flashes the default date up and then clears it on the screen.
User 187934 Photo


Senior Advisor
20,190 posts

Try this method.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script>
var jQ = $.noConflict(true);
jQ( document ).ready(function() {
var currdate = new Date("<?php echo $GuestRegisterDate;?>");
var currdate= currdate.getFullYear() + '-' + (currdate.getMonth()+ 1) + '-' + currdate.getDate();
jQ('input[name="GuestRegisterDate"]').val(currdate);
});</script>
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 348342 Photo


Registered User
24 posts

Thanks,

Installed the script before the call to the form - same result.

It flashes the date - then displays a blank field - guessing this is a function of the date picker - is there way to treat the field as a text field and the date picker is an ooption you popup if needed?

User 187934 Photo


Senior Advisor
20,190 posts

Did you try placing the script at the bottom of the form?
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 348342 Photo


Registered User
24 posts

Yes,

Same result.
User 348342 Photo


Registered User
24 posts

Hi,

I have a form where I have to integrate the use of a signature gathering mechanism and it has a check to make sure there is a signature in the form. Is there a way that I can access the validation routines on submission to check the remaining fields?

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.