'Avoiding entering value of ether in smart contract in Remix Injected Web 3 environment

I'm writing a smart contract so that a metamask wallet can send a certain value of eth to the smart contract. However, every time I tested the smart contract, I have to manually enter an integer. Is there any way I can solve this problem?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source