Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EN] Pre-population of data in TransactionEntry block #2359

Closed
1 task done
cabal95 opened this issue Jul 20, 2017 · 4 comments
Closed
1 task done

[EN] Pre-population of data in TransactionEntry block #2359

cabal95 opened this issue Jul 20, 2017 · 4 comments
Assignees
Labels
Type: Enhancement Feature requests.

Comments

@cabal95
Copy link
Member

cabal95 commented Jul 20, 2017

Prerequisites

  • Put an X between the brackets on this line if you have done all of the following:

Description

Recently the ability was added to TransactionEntry block to be able to specify the accounts via the URL. We would like to expand this ability to specify a default amount for each account as well. Use case would be pre-filled in donation form from another page that has various "donation tiers" that they can click to to give at that tier. The values from the URL would not be enforced but would be the default value if the user does not change.

Plan to add functionality to both the AccountIds and AccountCodes parameters. New delimiter would be ^ unless somebody has a better idea. Example: ?AccountIds=5^100,6^12.75 to pre-populate account 5 with $100 and account 6 with $12.75.

Also new related feature to allow default selection of the frequency as well. I believe this is specified by a DefinedValueId so that would be allowed to be passed via the query string as well. Example: &frequency=123.

Versions

  • Rock Version: 6.3
  • Client Culture Setting: en-US
@cabal95 cabal95 added the Type: Enhancement Feature requests. label Jul 20, 2017
@cabal95 cabal95 self-assigned this Jul 20, 2017
@jonedmiston
Copy link
Member

This is good to implement. While I know that they are not case sensitive let's keep all the parm names Pascal case. So frequency=123 should be Frequency=123. We have not been super consistent with that, but we're trying to be better.

@jonedmiston
Copy link
Member

While you're in there, what do you think about adding a third option on AccountIds to make it so the amount could not be changed? ?AccountIds=5^100^false. I suppose the easiest way to achieve this is to mark the field as disabled. It would be better UI to show it as as form-control-static, but that would make reading the value when complete difficult.

Thoughts?

@cabal95
Copy link
Member Author

cabal95 commented Jul 20, 2017

Sounds good to me. I can see the use for that too. For now I'll probably mark it disabled as changing it to a static control would require a much more invasive change. We can leave that for a later time.

And yes, I'll tweak the param naming. It's sometimes hard to remember (as a programmer) since they are actually not case sensitive. So when we do it wrong we don't notice. :)

@jonedmiston
Copy link
Member

Thanks Daniel!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Feature requests.
Projects
None yet
Development

No branches or pull requests

2 participants