Skip to content

Instantly share code, notes, and snippets.

@bangpound
Created May 12, 2016 22:00
Show Gist options
  • Save bangpound/4651f5307eea0ef9c1ff7abed7cd0c30 to your computer and use it in GitHub Desktop.
Save bangpound/4651f5307eea0ef9c1ff7abed7cd0c30 to your computer and use it in GitHub Desktop.
commit d6af3a3e4cd45c46ef9cd3c31d8347c59dc6c112
Author: Benjamin Doherty <[email protected]>
Date: Thu May 12 17:00:14 2016 -0500
use snake case for form element names.
diff --git a/src/BMMBundle/Form/AccountType.php b/src/BMMBundle/Form/AccountType.php
index e8971b0..c5cc2e2 100644
--- a/src/BMMBundle/Form/AccountType.php
+++ b/src/BMMBundle/Form/AccountType.php
@@ -15,16 +15,16 @@ class AccountType extends AbstractType
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
- ->add('startDate', null, array(
+ ->add('start_date', 'datetime', array(
'widget' => 'single_text',
))
->add('type')
->add('name')
->add('goal')
->add('schedule')
- ->add('interestRate')
- ->add('paymentAmount')
- ->add('minimumPaymentAmount')
+ ->add('interest_rate')
+ ->add('payment_amount')
+ ->add('minimum_payment_amount')
->add('category')
->add('id', null, array(
'mapped' => false,
diff --git a/src/BMMBundle/Form/LedgerType.php b/src/BMMBundle/Form/LedgerType.php
index aa923ee..3419f13 100644
--- a/src/BMMBundle/Form/LedgerType.php
+++ b/src/BMMBundle/Form/LedgerType.php
@@ -19,7 +19,7 @@ class LedgerType extends AbstractType
'widget' => 'single_text',
))
->add('balance')
- ->add('amountSubmitted')
+ ->add('amount_submitted')
->add('account')
->add('id', null, array(
'mapped' => false,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment