How to display and simultaneously transmit a value in the form HTML?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
24 views
Colleagues, Hello! Please help to understand.

There's a button on the form in which two important values name and value. The button will display with value. How to make so that value was written "Yandex Money" and the button passed value="20"? I can do multiple buttons with different names that convey a different index value. Sincerely, Alexander!

by | 24 views

4 Answers

0 like 0 dislike
Button leave alone, pass the value of hidden field.
\r\r\r\r\r\r\r
by
0 like 0 dislike
The fact that I need to implement a few buttons. 3 buttons for different payment methods. If the person clicks Yandex Money - need to pass value="20" W1 If the cashier then value="20", etc.

This option did not work :

\r\r\r\r
by
0 like 0 dislike
Alternatively, try to do something like that

And collect value from the value from data-transfer.
Or, if on replace the value for data-transfer
$('input[type=submit]').click(function() { $(this).val($(this).attr('data-transfer')); }
by
0 like 0 dislike
<?\rif (isset($_POST['page']))\recho $_POST['page']."<br/>"; ?> <!DOCTYPE html PUBLIC  "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\r\r\rTest page\r\rfunction sub(action){\rif (action == 1)\rwindow.document.getElementById('page').value = "20";\relse\rwindow.document.getElementById('page').value = "30";\r\rwindow.document.getElementById('form').submit();\r}\r\r\r\r\r\r\r\r\r\r


If you need ajax code you give..Please.
by

Related questions

0 like 0 dislike
2 answers
asked Jun 11, 2019 by yuraSco
0 like 0 dislike
1 answer
0 like 0 dislike
4 answers
0 like 0 dislike
2 answers
110,608 questions
257,187 answers
0 comments
40,796 users