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

Enhancements to Export Form functionality #839

Closed
kartik-v opened this issue Oct 10, 2018 · 2 comments
Closed

Enhancements to Export Form functionality #839

kartik-v opened this issue Oct 10, 2018 · 2 comments

Comments

@kartik-v
Copy link
Owner

  • Entirely eliminate rendering of the export form via GridView class
  • Render export form dynamically via javascript and append to body
  • This will allow the grid export to be embedded within another form (and not cause any nested html form error).
@carlos-landeira
Copy link

If I want to manipulate the data generated by the export function, what event can I use as a trigger? I previously had an "on submit" event for the export form with class "kv-export-form", since it was already rendered, but now it is not working anymore since the form is not rendered with the gridview.

@carlos-landeira
Copy link

carlos-landeira commented May 31, 2023

@kartik-v I checked the modified code and in this part:

$('<form/>', {'action': self.action, 'target': target, 'method': 'post', css: {'display': 'none'}})
                .append(getInput('export_filetype', type), getInput('export_filename', self.filename))
                .append(getInput('export_encoding', self.encoding), getInput('export_bom', self.bom ? 1 : 0))
                .append(getInput('export_content', content), getInput('module_id', self.module), $csrf)
                .append(getInput('export_mime', mime), getInput('export_hash', hashData), getInput('hash_export_config', 
                 hashConfig))
                .append(getInput('export_config', JSON.stringify(config)))
                .appendTo('body')
                .submit()
                .remove();

Wouldn't adding a class kv-export-form attribute for the <form> tag solve this?

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

No branches or pull requests

2 participants