Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm using the following:
Webform 7.x-3.20
Matrix 7.x-4.0
Arrange Fields 7.x-1.15
I am not able to move a Matrix by using the Arrange Fields module. Is there a way to make this possible, or is it not compatible at all?
Thanks
Comment | File | Size | Author |
---|---|---|---|
#8 | Incompatible_with_webform_matrix_component-2329367-9114333.patch | 708 bytes | chetan-singhal |
Comments
Comment #1
chetan-singhal CreditAttribution: chetan-singhal commentedI will look into this soon.
Comment #2
chetan-singhal CreditAttribution: chetan-singhal commentedHi
Replace arrange_fields.module file line no 880
From
$element_type = af_get($element["#type"]);
To
Your problem will solve.
Comment #3
chetan-singhal CreditAttribution: chetan-singhal commentedComment #4
kyleheney CreditAttribution: kyleheney commentedThanks a lot for your help! This worked perfectly!
That line for me was on line 924 though.
Comment #5
chetan-singhal CreditAttribution: chetan-singhal commentedComment #6
chetan-singhal CreditAttribution: chetan-singhal commentedI'm using the following:
Webform 7.x-3.20
Matrix 7.x-4.0
Arrange Fields 7.x-1.15
I am not able to move a Matrix by using the Arrange Fields module. Is there a way to make this possible, or is it not compatible at all?
Thanks
Comment #7
chetan-singhal CreditAttribution: chetan-singhal commentedComment #8
chetan-singhal CreditAttribution: chetan-singhal commentedPlease find patch for this.
Comment #9
chetan-singhal CreditAttribution: chetan-singhal commentedComment #10
kyleheney CreditAttribution: kyleheney commentedI found an error with your coding change.
By adding the code you provided, the Arrange Fields module can no longer move the submit button. I tried reverting back to original code and the submit button can be moved again.
This code also moves the Submit button to the top of every form (original location I guess) and it cannot be moved, even if there is no Matrix Component in the form.
Comment #11
kyleheney CreditAttribution: kyleheney commentedComment #12
kyleheney CreditAttribution: kyleheney commentedAny update on this one? The previous fix resulted in the Submit button moving to the top of all forms and prevents it from being able to be moved. Thanks
Comment #13
richardp CreditAttribution: richardp commentedI'm sorry I haven't had a chance to look into this further yet.
I don't think the fix described in #2 would work because if the matrix module is installed AT ALL, it will ignore all other types of fields other than webform fields. That's why the submit button isn't working anymore for kyleheney.
If you notice, near that code in the original file, I have a special section for Captcha module and maybe one or two others. That type of logic should be used to detect ONLY the matrix field itself.
Richard
Comment #14
kyleheney CreditAttribution: kyleheney commentedThanks for the update. I'll look forward to a modified fix in the future (hopefully!). It would be great to be able to move Matrices freely like other elements can be moved.