• Is there any way of modyfing askquestionform.php to make a ‘editquestionform.php’ to let the use edit posts in the front-end?

Viewing 1 replies (of 1 total)
  • Plugin Author trevorpythag

    (@trevorpythag)

    askquestionform.php has variables ($qtitle and $Qtext) that control what is displayed in the text fields. You could use get_post to find the values for the question the user wants to edit and set the text to these.

    You would also need to add an extra “hidden” input to the form (in coreform.php) so that you know which question to edit. Then in addquestion.php you would need to retrieve the hidden value and set it as the post id so that the question is updated instead of being added as a new one. If you didn’t want to have two copies of corefrom you could use a value like -1 for the post id when its a new question form and then use an if statement in addquestion.php.

    Hope that makes sense. I might add this as a feature in a future version.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Question and Answer Forum] Is it possible to modyfing askquestionform.php to make a 'e’ is closed to new replies.