Topic: Don't get value from datepicker in PHP

gerdhuber pro asked 3 years ago


Expected behavior I don't get the value from datepicker in php variable $_REQUEST / $_POST

Actual behavior

Resources (screenshots, code snippets etc.) https://mdbootstrap.com/snippets/standard/gerdhuber/2868576


Grzegorz Bujański staff answered 3 years ago


There is no element in your form that will trigger the submit.

You can add <button type="submit"> or try the solution from this snippet: https://mdbootstrap.com/snippets/standard/grzegorz-bujanski/2869822#js-tab-view


gerdhuber pro commented 3 years ago

Thank you for answering.

I have created now the full from with buttons. Please see https://mdbootstrap.com/snippets/standard/gerdhuber/2870051

I got values in php from the first and the third field, but not from the datepicker.

What is the problem?


Grzegorz Bujański staff commented 3 years ago

Unfortunately, I can't get into this snippet. I get an error. You probably didn't click publish. I modified the snippet and I can see that I can get the value after submit without problem: https://mdbootstrap.com/snippets/standard/grzegorz-bujanski/2869822#js-tab-view


gerdhuber pro commented 3 years ago

sorry, i published it now.


gerdhuber pro commented 3 years ago

Hallo,

can you please help me, thank you.


gerdhuber pro answered 3 years ago


Hallo,

i have found the error. I have to put

name="exampleDatepicker4"

and it works. Please correct your examples, thank you.


gerdhuber pro answered 3 years ago


Did you understand my behavior, do you need more information from me?

Gerd


Grzegorz Bujański staff commented 3 years ago

These screenshots show me nothing that would work incorrectly. I see that you added two inputs in the form and log returns you the values ​​of both. What is wrong in this case?


gerdhuber pro answered 3 years ago


Thank you for the correct link.

I have made more tests, see the results. whre can i send you my php-file?

enter image description here image1: here you can see the array $_REQUEST and his values, which the emtpy datepicker

image2: enter image description here head-section

image3: enter image description here body-section

image4: enter image description here

image5: enter image description here here i see the values, with the java.log


Grzegorz Bujański staff answered 3 years ago


Check out this snippet: https://mdbootstrap.com/snippets/standard/grzegorz-bujanski/2878059


gerdhuber pro commented 3 years ago

I can't open the snipped, pleae have a look, thanks.


Grzegorz Bujański staff commented 3 years ago

Sorry about that. I fixed the link. Check now.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB Standard
  • MDB Version: 3.2.0
  • Device: PC
  • Browser: FireFox
  • OS: win10
  • Provided sample code: No
  • Provided link: Yes