php - symfony input without name -


i'm trying implement payment system in website symfony.

i have add form, takes creditcard number. don't want number coming server. need form in no name attribute specified. server cannot take value , read value directly javascript.

does know how form without name?

if do:

$form = $this->createformbuilder()                 ->add('creditnum', 'text')                 ->getform(); 

this automatically creates name attribute.

you think creating 2 separate forms, 1 form order form, , 1 form contains credit card field(s). way can still handle payment processing via javascript, , when user submits main order form, credit card field not part of it, , won't submitted server.

you'd have use javascript (or tricky css) display 2 forms nicely, might create credit card field javascript outside of form itself, , position looks it's part of form.


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -