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

Page skips to top #11

Closed
bennie99 opened this issue Feb 15, 2018 · 1 comment
Closed

Page skips to top #11

bennie99 opened this issue Feb 15, 2018 · 1 comment
Assignees

Comments

@bennie99
Copy link

bennie99 commented Feb 15, 2018

As reported in this thread the page jumps to top when you have sent the form and the confirmation is shown. This behaviour is not what we expected because holding the form in place is the reason we like to use ajaxform
That wasn't the case in Contao 3.5

@bennie99 bennie99 changed the title Site skips to top Page skips to top Feb 15, 2018
@mhsolutions
Copy link

In Contao 4.4 (maybe also in other versions) you need to edit the ajaxform.html-Template. Apparently in Contao 4.4 there is no 'formId' anymore so what I did was to edit these lines:

From:
id="<?php echo $this->formId;
To:
id="<?php echo $this->formSubmit;

Also in the jQuery Section you need to change these lines:

From:
var form = $('#<?php echo $this->formId; ?>');
To:
var form = $('#<?php echo $this->formSubmit; ?>');

Same goes for the mootools-Section.

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