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

I tried to get separate input fields for tags.

The approach was adding different fields through qa-theme.php and then merge the input data to process it the normal way.

Just for the ask but not the edit form to make it not that difficult.

However it turned out that the fields need to be added through a function qa_set_up_tag_field() otherwise it wouldnt work.

So i did not find a working solution.

What would be the best way to handle that,( as detailed as possible please...)

 

The normal instruction :

Tags - use hyphens to combine words:

is difficult for many people with the result that they do not tag their questions well.

See image:

 

EDIT 1

 

Nobody has an idea ?

Q2A version: 1.5

2 Answers

+1 vote
by
If you try to understand how Q2A insert tags into database than you may realize how it is complicated to make it work with  individual field for each tags.

Q2A adds tagas as an array to database now you want to separate them and than again you need to merge and insert into databvase as an arrray. This requried two additional functions at the back end ( I am gussing and not sure if more code required or not ) to separete one field into many than you need to merge all input field value into one string or an array and insert into database.

This is what my logic but please correct me if I am wrong. I would appreciate that.

To add more field you may need to use layer and than write own function to merge fields value before it goes to core function to the database.
by
Your logic is fine, I think it is exactly whats needed. I managed it to have a second field and I am as well able to merge the two arrays, but somewhere inside this something goes wrong. I do not really see what, but I will try it again and post my result here. Thank You anyway
+1 vote
by
I think an easier way would be to use Javascript. Hide the original tag field and add your extra ones. When they fill a tag in, add it to the original field. Then the original field gets submitted as if they added the tags normally.
by
@Scott
I am trying to get it to work with php, but if it does not work I would be happy to get help on a java script solution as well. It sounds very well.

Here I add a link to a german page with the (i think) perfect ask form:

http://www.cosmiq.de/qa/ask/

What do You think ?
by
In the admin panel I have access to settings
- Maximum number of tags:
But I do not have access to a set
- Maximum number of characters in the tags
 
The default is 800 characters in question.
I want to increase this number. how can I do this?
Tags are saved to the db table qa_posts the column (tags varchar (800). However increase of 800 does not work.
The database localhost "information_schema" COLUMNS is a record:
qa_widgets - tags - 4 - NULL - NO - varchar - 800 - 800 - null - null - ascii - ascii_general_ci - varchar (800),
who probably defines the maximum number of characters, but I can not change that.
...