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

Redundantly Wrapped startFormTags() #32

Open
geirman opened this issue Apr 18, 2019 · 4 comments
Open

Redundantly Wrapped startFormTags() #32

geirman opened this issue Apr 18, 2019 · 4 comments

Comments

@geirman
Copy link
Contributor

geirman commented Apr 18, 2019

When scaffolding out a new object, I noticed the following...

view/{controller}/new and view/{controller}/edit files are created with a similar structure...

#startFormTag()#
	#includePartial("form")#
	#submitTag()#
#endFormTag()#

Inside the _form.cfm partial is something like this...

#startFormTag()#
	<!--- form helper functions & markup --->
	#submitTag()#
#endFormTag()#

Because of this, the result is two forms, one nested inside the other, and two submit buttons.

I'd like to submit a PR on this, but it's not immediately obvious where I'd make this change. My first thought was to edit the /templates/crud/_form.txt file, but it appears that the CLI does all the magic within there. So, where's that magic happening?

@neokoenig
Copy link
Contributor

Weird, that shouldn't happen.
commands/scaffold.cfc just calls a bunch of wheels generate x commands;
So it's the /generate/ folder you'd want to look at, probably /generate/view.cfc which just reads a file from the template directory and then replaces all the placeholder tokens

@bpamiri
Copy link
Collaborator

bpamiri commented Feb 6, 2022

@geirman can you let me know what specific sequence of commands you ran. I’m trying to reproduce the error.

@geirman
Copy link
Contributor Author

geirman commented Feb 6, 2022

@bpamiri Sorry Peter, this was soo long ago and I've slept many times since then and cannot recall. Sorry for not documenting the steps to duplicate this issue better when those details were fresh. Also sorry for dropping the ball on the PR I promised. (shame)

@bpamiri
Copy link
Collaborator

bpamiri commented Feb 7, 2022

@geirman No worries Chris. I’m actively working on the CLI so if you run across anything let me know.

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

No branches or pull requests

3 participants