• Hi, I love this plug-in. Hope you don’t mind me altering it. I’m trying to use it as a way for parents to log their volunteer time in order to earn tuition discounts at their kids’ school. I’d like to allow the “client” or principal add her own projects. I’m altering the client frontend to do this. I’m able to get the add project form to work, but it’s no updating the table. Could you please take a look at this code and tell me what I’m doing wrong? I’m more a vb person so this is new territory for me. ?? Thank you!

    function print_frontend_task_form( $client_id ){
    	$x = Array();
    		$what = __('Add New Project',NDZ);
    		?>
    		<h2 id="add-project"><?php echo $what; ?></h2>
    		<form method="post" action="<?php echo get_permalink( get_option( 'Ndizi Frontend Page' ) ); ?>">
    			<?php $this->_form_row( 'ndizi_action', NULL, 'frontend_add_project', 'hidden' ); ?>
    			<?php if( !is_null( $id ) ) $this->_form_row( 'project_id', NULL, $x['project_id'], 'hidden' ); ?>
    			<table class="form-table">
    			<tbody>
    
    				<?php	$this->_form_row( 'name',			__('Project Name',NDZ),			$this->_val($x,'project_name') 						);
    						$this->_form_row( 'description',	__('Project Description',NDZ),	$this->_val($x,'project_description'),	'wysiwyg'	);
    						$this->_form_row( 'client_id',		__('Client',NDZ),				$this->_val($x,'project_client_id'),	'clients'	);
    						$this->_form_row( 'active',			__('Active',NDZ),				$this->_val($x,'project_active','y'),	'yn' 		);
    						$this->_form_row( 'submit',			NULL,							$what,									'submit'	);
    				?>
    
    			</tbody>
    			</table>
    		</form>
    
    		<?php
    	}
    
    	function frontend_add_project($id = NULL ){
    		$params = Array(
    			'client_id'		=>	'client_id',
    			'project_name'	=>	'name',
    			'description'	=>	'description',
    			'active'		=>	'active',
    		);
    		$args = $this->_params_to_args( $params, $_POST );
    		if( !$args ) return;
    		return $this->add_project( $args );
    	}

  • The topic ‘Help Allowing Client to Add Project’ is closed to new replies.