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

id attribute support added for csrf_field #1563

Merged
merged 2 commits into from
Dec 3, 2018

Conversation

nowackipawel
Copy link
Contributor

i.e. useful in autocomplete forms (it is faster to reach this field by id than by name or its position in form)

Each pull request should address a single issue, and have a meaningful title.

i.e. useful in autocomplete forms (it is faster to reach this field by id than by name or its position in form)
@lonnieezell lonnieezell merged commit 5a54e01 into codeigniter4:develop Dec 3, 2018
@nowackipawel
Copy link
Contributor Author

@lonnieezell :
hi there, there is one functionality missing. it is gr8 that we could specify id attribute using this function but .... there is still issue if we want to specify it via "form_open" function.

What do you think to specify it like this?:

function form_open('',  ['csrf_id' => 'new-id'])

Honestly I don't like this idea cuz this attribute does not like naturally ... do you have any ideas to achieve it? It will be great to have possibility to define csrf field attribute in form_open as well.

@lonnieezell
Copy link
Member

There's not an elegant way that I can really think of for that. The bigger question is - how important is it to be able to customize the id for this?

@nowackipawel
Copy link
Contributor Author

Using forms which can be sent by regular post or by javascript call is good to be able to get value of csrf value easily. Additionally getting this value by elements id is the most efficient way .
Thx.

@nowackipawel
Copy link
Contributor Author

#1633

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

Successfully merging this pull request may close these issues.

2 participants