Answer the question
In order to leave comments, you need to log in
Substituting values in a form when clicking on a link?
Hey!
The site has 2 pages.
On the 1st - url link,
On the 2nd - form-calculator on jquery, where there are inputs and selects.
How to do substitution of values for the form when following the link?
Found a variant on JS
<input type="text" id="field">
<script> $('#field').val(window.location.hash.substr(1));</script>
<?php
$text = "Не указан";
if(isset($_GET['text']))
{
$login = $_GET['text'];
}
?>
<input type="text" value='<?php echo $text; ?>' >
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question