THIS THREAD HAS BEEN CLOSED.

How to add custom field in posting and editing project

Updated on Sep 8, 2016 in FreelanceEngine
8 on Aug 26, 2016

Hello,

I checked most of the tickets for the thing but i found nothing for same with proper answer. In one of the ticket you mentioned to use ae_fre_insert_post and ae_fre_update_post action to send custom field data. But you didnt mentioned how it is going to get project post data or how its going to get project id, which needs to use in database query.

It will be better if you can provide developer docs with code example. so users who are developer and dont have budget to by addons. they can at least look into docs and implement things. Right now, you dont support customization and event dont answering tickets and forums properly with proper answer. what i see majority in forum answer my engine theme is “sorry its a complex and bigger task, you need to consult to some developer.” This answer doesn’t fit with developer. they can actually implement things but for that you dont have any developer docs to understand your theme flow or actions and filters with working examples. 

  • Liked by
0 on Aug 26, 2016

Hi Rishi,

Regarding the add custom field in posting and edit the project. You could use the AE Custom Fields plugin to do that.

Regardless, here’re some suggestions that you can refer to implement this.

  1. Chek code in template/post-project-step3.php file or use the hook ae_submit_post_form to add new field into posting form.
  2. Use the hook ae_insert_project and ae_update_project to save the new field or edit field.
  3. Check code in template-js/modal-edit-project.php file or use the hook ae_edit_post_form to add new field in edit project form.

That is what I can give you for referencing thus far. I will notice to our developer to consider and improve our technical documentation soon.

Thank you for your time!

  • Liked by
Cancel
0 on Aug 26, 2016

Hello Dan,

I checked the above hook and implement it into child theme. I am able to add fields in post submit and edit form. Also able to save them. But i am having issue in getting field data into edit form. Can you look into below code and let me know. 

<?php function rc_add_custom_field_editing_form(){
 global $required_field;
 ?>
 <!-- Wedding Date -->
 <div class="form-group">
 <div class="row">
 <div class="col-md-4">
 <label for="et_expired_date" class="control-label title-plan"><?php printf(__("Wedding Date ", ET_DOMAIN) ); ?></label>
 </div>
 <div class="col-md-8 col-sm-12">
 <input required type="date" class="input-item form-control text-field" id="et_expired_date" placeholder="<?php _e("Wedding Date", ET_DOMAIN); ?>" name="et_expired_date">
 </div>
 </div>
 </div>
 <!--// Wedding Date -->
<!-- Wedding Location -->
 <div class="form-group">
 <div class="row">
 <div class="col-md-4">
 <label for="project_location" class="control-label title-plan"><?php _e("Wedding Location", ET_DOMAIN); ?></label>
 </div>
 <div class="col-md-8 col-sm-12">
 <textarea required name="et_wedding_location" id="et_wedding_location" class="input-item form-control textarea"></textarea>
 </div>
 </div>
 </div>
 <!--// Wedding Location -->
<?php }
add_action( 'ae_edit_post_form','rc_add_custom_field_editing_form' );
?>

Can you tell me how to get saved data into this fields on edit form. In wordpress admin i am able to see this fields data. so i am confirm on that data is saved. 

  • Liked by
Cancel
0 on Aug 26, 2016

Hello Dan,

I checked the above hook and implement it into child theme. I am able to add fields in post submit and edit form. Also able to save them. But i am having issue in getting field data into edit form. Can you look into below code and let me know. 

<?php function rc_add_custom_field_editing_form(){
global $required_field;
?>
<!-- Wedding Date -->
<div class="form-group">
<div class="row">
<div class="col-md-4">
<label for="et_expired_date" class="control-label title-plan"><?php printf(__("Wedding Date ", ET_DOMAIN) ); ?></label>
</div>
<div class="col-md-8 col-sm-12">
<input required type="date" class="input-item form-control text-field" id="et_expired_date" placeholder="<?php _e("Wedding Date", ET_DOMAIN); ?>" name="et_expired_date">
</div>
</div>
</div>
<!--// Wedding Date -->
<!-- Wedding Location -->
<div class="form-group">
<div class="row">
<div class="col-md-4">
<label for="project_location" class="control-label title-plan"><?php _e("Wedding Location", ET_DOMAIN); ?></label>
</div>
<div class="col-md-8 col-sm-12">
<textarea required name="et_wedding_location" id="et_wedding_location" class="input-item form-control textarea"></textarea>
</div>
</div>
</div>
<!--// Wedding Location -->
<?php }
add_action( 'ae_edit_post_form','rc_add_custom_field_editing_form' );
?>

Can you tell me how to get saved data into this fields on edit form. In wordpress admin i am able to see this fields data. so i am confirm on that data is saved. 

  • Liked by
Cancel
1 on Aug 29, 2016

Hi Rishi,

Kindly use the hook 

ae_insert_project

and 

ae_update_project

to check the submit form value and save it.

Thank you!

Customer Customer
on Aug 29, 2016

Hello Dan,

I think you misunderstood what i asked. I asked for not getting saved data into edit form. I am able to add fields and save data. But data is not coming in edit form. there is no instruction on how data is going to come in project edit form custom fields anywhere.

Show more replies
  • Liked by
Cancel
0 on Aug 29, 2016

Hi Rishi,

Kindly have a look at the hook ae_convert_project and make sure you have assign new variable for this hook return.

Thank you!

  • Liked by
Cancel
0 on Sep 8, 2016

Hi dan,

I am able to get it work on project stuff everywhere. But recently it come to my notice that, fields are also coming on profile page of employer and freelancer. Can you let me know what to do to not load fields for them. Fields are only for project posting and editing.

  • Liked by
Cancel
0 on Sep 8, 2016

Hi Rishi,

In this situation, You have to add new condition to check and make it only availe for the section you want. Ex: you can add new meta field to filter which is project field, which is profile fields.

Moreover, you could buy the AE Fields plugin to get a closer look and customize this plugin for your purpose.

Hope it helps!

Dan.

  • Liked by
Cancel
Loading more replies
Posting & Replying function will be deactivated from 3pm GMT+7 12th Sep.
Read More