Skip to:
Content
Pages
Categories
Search
Top
Bottom

extra fields in topicform (edit-function)

  • @chrissilisa

    Participant

    Hello,

    I use this function (in functions.php) to show extra fields over a topic form:

    add_action ( 'bbp_theme_before_topic_form_content', 'bbp_extra_fields');
    function bbp_extra_fields() {
    
    	
    	/*Extra-Felder Baufinanzierungsberater*/
    	if($GLOBALS['forum']=='baufinanzierungsberater'){
    
    		echo '<div id="baufinanzierungsberater_edit_box"><div style="width:50%;float:left;">';
    
       			$value1 = get_post_meta( bbp_get_topic_id(), 'nachname', true);
       			echo '<label for="nachname">Nachname</label>';
       			echo "<input type='text' name='nachname' value='".$value1."'><br />";
    
       			$value2 = get_post_meta( bbp_get_topic_id(), 'vorname', true);
       			echo '<label for="vorname">Vorname</label>';
       			echo "<input type='text' name='vorname' value='".$value2."'><br />";
    }}

    This works. But when I want to edit the fields after saving the topic, the fields are gone. Which action do I have to use to show the fields?

    Thanks,
    best regards
    ChrissiLisa

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Skip to toolbar