Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
805 views
in Q2A Core by
Hello, I want to hide the answer form until the button is pressed. How can I do that?
Q2A version: 1.8.1

2 Answers

+2 votes
by

Hello trundd,

You can head over to 'Admin' > 'Viewing', look for the setting 'Show answer form immediately:' and then select 'Never' in the drop-down list next to it.

Have a nice day!

by
Thank you for your answer. I already use it this way, but it doesn't work for me
by
Sometimes plugins can change Q2A functionality. What's the result you get after adjusting this setting in a brand-new installation (without plugins)?
by
I think my problem stems from the theme. How can I fix this?
by
If that’s the case, then you need to look under the hood to see how it’s getting in the way of showing/hiding the answer form. Here are a few tips:

- Report this issue to the theme author and ask him how to get it to work. If it’s an open source theme, you can mention it so that other community members with a similar problem can help you out.

- Choose one of the providers listed here: https://docs.question2answer.org/services/#q2a-support-and-development and ask him to fix this issue for you.  I can provide specialized service as well.

In any way, you’ll get better and faster results if you provide as much information as possible.
by
I use the "dude" theme that was written years ago by rahularyan, which is not used now. Do you need to change the front end to fix this? or back end?
by
Is it the theme you're referring to?
https://github.com/rahularyan/dude-theme
by
Yes, i am using this theme
by
Unfortunately, it doesn't work out of the box but, after skimming through the code, I found some files you might look at:

1- The 'onclick' attribute is removed here:
https://github.com/rahularyan/dude-theme/blob/e49480ee38c703df35f41e314e441d4fa5028a71/qa-theme/dude/question-q.php#L83
That's for showing/hiding the form (at least in a clean Q2A installation) in the front end.

2- The form container that needs to be shown/hidden is rendered here:
https://github.com/rahularyan/dude-theme/blob/e49480ee38c703df35f41e314e441d4fa5028a71/qa-theme/dude/answer_form.php#L13
In a clean Q2A installation, a 'style="display: none"' would be added here. It hides the form until users click on the 'Answer' button.

It'd be nice if somebody else, who also uses this theme, could step in and give you a hand.
by
Yeah, it would be really good. I can hide the box but I have no idea how to activate it again
0 votes
by
I tried these steps for this problem; I gave "visibility:hidden" to the answer form, clicking the button specified in the javascript file "visibiliyt:visible;" I changed it to, but I can't find the "answer" button. The $form $columns was created in the form of. How can I fix this?

Welcome to the Q&A site for Question2Answer.

If you have a question about Q2A, please ask here, in English.

To report a bug, please create a new issue on Github or ask a question here with the bug tag.

If you just want to try Q2A, please use the demo site.

Categories

...