Support the ongoing development of Laravel.io →
Database Eloquent Forms
Last updated 1 year ago.
0

Short answer, no. Javascript is parsed client side, and PHP is parsed server side. Since PHP is compiled then sent to your browser, there is no longer an opportunity to parse a variable once it is at the client's browser. However, what can be done is use javascript, and submit a value via ajax back to PHP (server side), return a response from server. Then use that response to manipulate the DOM.

Last updated 1 year ago.
0

Thanks. Changed how the form flows--no longer relying on javascript except to do front end validation.

Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

embj69 embj69 Joined 26 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.