Skip to content

help in form input calculated value from other fields #6538

Closed Answered by danharrin
fateh-dris asked this question in Help
Discussion options

You must be logged in to vote

Amount should be a Placeholder, not a real TextInput. It can be dynamically calculated based on the items.

Placeholder::make('amount')
    ->content(function ($get) {
        // Use $get('products') to get an array of items.
        // Loop through each item and make a total
        // Return the total from this function
    })

Replies: 4 comments 5 replies

Comment options

You must be logged in to vote
2 replies
@fateh-dris
Comment options

@nepriantodeveloper
Comment options

Answer selected by fateh-dris
Comment options

You must be logged in to vote
3 replies
@danharrin
Comment options

@alancarlosml
Comment options

@danharrin
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
5 participants