Closed (fixed)
Project:
Form Placeholder
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
27 Dec 2014 at 00:04 UTC
Updated:
14 Nov 2016 at 13:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
replicaobscuraI'd like to weigh in here.
For me the issue with AJAX submissions is that the selector does not work anymore. I am using the form ID as a selector, which is the ID of the top-level element in the "context" provided by Drupal's AJAX API. Form Placeholder then tries to select that ID within context, but it fails.
I think the solution is to select form elements in the entire document, not just within the AJAX context.
One simple way to do this, is when you set the form placeholder, append ".addClass('form-placeholder-processed')" to it.
Then above add:
exclude += ', .form-placeholder-processed';
Then remove context from the main selector. Now, it will process any unprocessed placeholders on the entire document whenever an AJAX request is recieved, allowing your selectors to include parents outside of the AJAX context.
Comment #2
sarav.din33 commentedI have tried.
#form_placeholder = TRUE
But its no more help me.
For me the issue because of ajax file upload. In my form there is a ajax file upload field. Once i select & upload a file the settings variable (settings.form_placeholder) became undefined in form_placeholder.js
file: form_placeholder/form_placeholder.js
line no: 13
var include = settings.form_placeholder.include;
So i have added a typo check condition on the beginning of Placeholder attach attribute. So my script looks below,
It will solve me the issue.
@maintainer, Please verify it.
Comment #3
jidrone commentedI think that the method in comment #1 is the correct, I have used it some many times with good results.
I have created a patch using that approach.
Comment #4
vijay.cgs commentedWorking fine for me with the attached code #2
Comment #5
marcopbazz commentedPatch #3 worked form me!
Comment #6
marcopbazz commentedPatch #3 worked form me!
Comment #7
szeidler commentedPatch #3 is working fine for me. With that patch applied, the module is also compatible with
inline_entity_form, which makes heavy use of AJAX and forms.Comment #8
Yoris00 commentedPatch #3 worked! Thx @jidrone
Comment #10
rafalenden commentedThank you for help!