Hi,
I am using the FAQfield in another context (not question and answer pairs), and it would be nice if a FAQ could be saved, even if no headline (aka question) is entered.
I'll look at this later and will try to implement it somehow - if you have any comments or hints -- very appreciated :)
Thanks,
walter
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | both_empty-1513214-4.patch | 830 bytes | patrickd |
| #2 | both_empty-1513214-3.patch | 979 bytes | valderama |
Comments
Comment #1
patrickd commentedHi walter!
I know there are some people using faqfield in other context, but I think making the question field optional is the wrong direction for this module.
It really just targets to make it easy to have a high configurable FAQ-field with accordion effect.
For anything that goes beyond this I personally prefer using field collections and field groups (with accordion effect grouping).
You should check this out before we start hacking around here ;-)
please let me know if this would be an alternative for you
regards
Comment #2
valderama commentedYeah, that is true. Packing to much options into a very specific module is not optimal.
However, what currently can happen is, that if someone enters an answer and then wants to save the current state without entering an question, the answer is lost. It seems, that the field should be saved if at least one of the two fields is filled.
Here is a patch, which does exactly this and works for me..
Comment #3
patrickd commentedOkay, that's a point we can work on
Attached patch removes whitespace-errors and corrects coding standarts of #2
This is a quite sensitive part of this module (what comes by mixing up the input forms of the answer widget), so we should do some extensive testing on this.
Comment #4
valderama commentedThanks, your patch is much cleaner. And I learned more about the Drupal Coding Standards.
We will be using faqfield with this modification, and I'll definitely watch for problems..
Comment #5
patrickd commentedSounds great! I'll do some testing until weekend.
Thanks for using it and your always appreciated feedback :-)
Comment #6
patrickd commentedTested and committed, seems to work fine.
Will do more exhaustive tests on 7.x-1.x in general.
Thanks