Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+33 votes
22.5k views
in Plugins by
edited by

This plugin add extra fields to ask / edit form and question page. Although Q2A can add only one textbox, this plugin can add textbox / checkbox / selectionbox / radiobutton / textarea / file without any restriction. Refer to readme in download-file for description.

Views

  1. Screen shot 1: ask form
  2. Screen shot 2: page view (no design by CSS)
  3. Screen shot 3: edit form

Compatibility

Q2A V1.6, V1.7 [2014/12/30 Updated]

Update history

  • [V1.7] 2015/02/04 Add file extension check feature in case of file type field.
  • [V1.6.4] 2014/09/19  Fixed bug (If files exist on upper content, popup don't work)
  • [V1.6.3] 2014/03/16  Fixed bug (Error on none description question post)
  • [V1.6.2] 2014/03/13  Fixed bug (Post data of none moderated user is not stored on moderation mode)
  • [V1.6.1] 2014/01/09  Fixed bug when question is hided.
  • [V1.6] 2013/12/13  Add lightbox effect with responsive design.
  • [V1.5] 2013/12/05  Add textarea and file type. And, Fixed a lot of bugs.
  • [V1.4] Add required option.

Download

Have hun !!

Q2A version: 1.6, 1.7
by
This plugin is outdated, and is no longer maintained as the author left Q2A community haft a decade ago.

In short: doesn't work!
by
Link to add does not work.
by
Link to plugin does not work.
by
Is there such a plugin that works for replies as well? The user should be able to select an option when answering questions.

11 Answers

+4 votes
by
Nice plugin but one thing! Is there a way to hide the label on question page if there is no input?
by
Thank you VdoubleE for your opinion. I try improvement.
by
Perfect! This plugin is so needed thanks for listening!
+1 vote
by
Really excellent work !!

I just hope that we will have one day as well an image-field or gallery-field so we can use q2a in so many other ways.

Classifieds for example...

Thank You !!
by
Thank you monk333 for your opinion. Like forum-CMS(Bulletin board etc), it is good that  files can be attached "easily" by extra field. I feel that Jatin was developed plugin which attaches voice file too. I will further develop.
+1 vote
by
Hi sama55,
This is great!
I am looking for a way to add titles to answers and it seems that adding your text field would do the trick. Is there an easy way to also apply this feature on answers?
Would most appreciate your elaborate answer (as much as you can)
Thanks in advance.
by
Thanks karo. qa_postmetas table key is postid. Therefor, I think that you can add extra fields to answer, if you make other plugin mimicking my plugin.
by
Yeah that's the idea,
I`m new to Q2A and still trying to figure out where are the relevant values for answer form and question form and replace the two.
Would most appreciate your help on this
by
Yes i'm also facing trouble with applying this plugin to answers also. i know that i need to copy this plugin, give it a different name but what to change inside?
+1 vote
by
I have one question for this plugin, that should we have to set a particular value of attachment fields or with every attachment a next attachment file option will come forward?
+1 vote
by
Hi Sama
 
In your filter file, you have a process_event function where you declare a global $qa_extra_question_fields. You then test if it's set.
 
My questions are:
 
1) Will it ever be set?
2) Will it issue a warning if testing on a variable index not set?
 
Thanks!
 
function process_event ($event, $userid, $handle, $cookieid, $params) {
   global $qa_extra_question_fields;
   switch ($event) {
      case 'q_queue':
      case 'q_post':
      case 'q_edit':
         for($key=1; $key<=qa_eqf::FIELD_COUNT_MAX; $key++) {
            if((bool)qa_opt(qa_eqf::FIELD_ACTIVE.$key)) {
              $name = qa_eqf::FIELD_BASE_NAME.$key;
              if(isset($qa_extra_question_fields[$name]))
                 $content = qa_sanitize_html($qa_extra_question_fields[$name]['value']);
              else
                 $content = qa_db_single_select(qa_db_post_meta_selectspec($params['postid'], 'qa_q_'.$name));
              if(is_null($content))
                 $content = '';
             qa_db_postmeta_set($params['postid'], 'qa_q_'.$name, $content);
         }
    }
    break;
    case 'q_delete':
        for($key=1; $key<=qa_eqf::FIELD_COUNT_MAX; $key++) {
            if((bool)qa_opt(qa_eqf::FIELD_ACTIVE.$key)) {
               $name = qa_eqf::FIELD_BASE_NAME.$key;
               qa_db_postmeta_clear($params['postid'], 'qa_q_'.$name);
           }
       }
       break;
   }
}
by
Since I do not watch your output HTML, I do not understand detailed things. Probably it will be a basic problem irrelevant to Q2A.

http://www.php.net//manual/en/features.file-upload.post-method.php
https://www.google.co.jp/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=input+file+_FILES+empty
by
Hmmm, can it be the difference in the way the forms are submitted? When I submit a question the page is reloaded, but when I submit an answer/comment the page is not reloaded (it's ajax right)? Could that be the reason the $_FILE is empty when the process_event (in the event file) is called for comments/answers?
by
After further investigation, I don't think it's possible to do this file upload for answer/comment at all. Since answers/comments are not really submitted (but saved via ajax), there is no way the $_FILES is set.
by
I think this will work, however it's not easy: In the form for answer/comment, add an iframe. The iframe contains an extra form with just an input of type FILE (style it so the user won't notice the iframe) for the user to select a file to upload. Action on the form in the iframe is set to our own php-file. This php will take care of saving the file to the database. When submit button is triggered on answer/comment form (catch in new plugin -> events), we programmatically trigger the iframe submit.

Some of this ugly workaround could have been avoided if Q2A was upgraded to HTML5. Then I could have used Ajax upload plugins. I don't understand why Q2A is still running HTML4.01 - it's not like HTML5 is cutting edge :-)
0 votes
by
helo sama,

thanks for your work. i just tried to use EQF with q&a1.7 and don't seem to get it to work. i can configure the plugin in the admin section to show one file upload field, but it doesn't show up when asking a new question.

when enabling "Input is required" i get an error when trying to post a question, so it seems the plugin is active somehow only i don't see any field that i could input as a user.

is there anything i could be doing wrong?
by
This is running correctly in my environment. If there is not more detailed information, it is difficult to advice. e.g. Error contents, your theme, other plugin, etc.
by
ah, thanks for the hint: i removed all other plugins and found http://peatarian.com/blob/loginrequirement.zip as mentioned here: http://www.question2answer.org/qa/26289/how-can-i-hide-all-info-when-users-are-not-authenticated?show=26289#q26289 to be the culprit.

if i remove that plugin, yours works.
any idea how to fix that?

or an other idea to hide the questions page to unauthorized users?
by
edited by
Your code is wrong. If you call the below line in somewhere in your main function, my plugin will work correctly.
qa_html_theme_base::main();
Or, your two changes should be processed at the first of the two functions.
page_title_error() and main_parts()

Coding method of correct layer function:
http://www.question2answer.org/layers.php
Point: If you want to ensure compatibility with other plugins, you will need to call the same named parent function. e.g.
qa_html_theme_base::nav_list($navigation, $navtype);
qa_html_theme_base::head_script();
qa_html_theme_base::post_tag_list($post, $class);
qa_html_theme_base::post_meta_who($post, $class);
by
i am afraid i didn't write that code myself and am not familiar with php...anyway i tried to follow your advice and put the line
 qa_html_theme_base::main();
in line 13 of qa-login-requirement-layer.php

looks like so:
...
    function main()
        {
            qa_html_theme_base::main();
            $content=$this->content;
...

now your plugin indeed works, but this plugin is broken in that questions are now visible to unauthorized users. any more hints you could give me?
0 votes
by

Hey @sama55 !

Great plugin! I was wondering and already asked here on Q2A, how can I use Markdown/CKEditor4 instead of using the simple normal default editor on the text area field?

0 votes
by
Thanks for the plugin!

 

How can I allow only registered users to upload files?
0 votes
by
Hello, does anybody still have the source code for this plugin? because when I press the download button nothing happens and thank you.
by
Thank you, and also do you have an idea on how to make this plugin work on answers too and not only questions?
by
thanks for your work. i just tried to use EQF with q&a1.7 and don't seem to get it to work. i can configure the plugin in the admin section to show one file upload field, but it doesn't show up when asking a new question.

when enabling "Input is required" i get an error when trying to post a question, so it seems the plugin is active somehow only i don't see any field that i could input as a user.
0 votes
by
I hope someone can remake this plugin . This is really usefull
by
And also extra question field Plugin from jacksiro it doesn't work anymore
by
I am back I will try to fix the plugin. and see how best it can work now in the new php version
0 votes
by

I just came back here I will try to fix the plugin, I have the source code. and see how best it can work now in the new php version. I hope someone will be kind enough to buy me tea 

by
If that the case . Why dont you justsell this plugin ?

Or make 2 version , free and paid plugin .

As for paid plugin . I have idea .
It would interisting If the plugin have a fitur like this website https://buzzy.akbilisim.com/create

Please see the demo when create a post .

So the user  can write in additional text , add audio,   image , video , poll ,gallery or image slider, embed twitter FB instagram post or youtube video .

With this plugin I dont think need to buy premium text editor
...