Title: maximgrachev's Replies | WordPress.org

---

# maximgrachev

  [  ](https://wordpress.org/support/users/maximgrachev/)

 *   [Profile](https://wordpress.org/support/users/maximgrachev/)
 *   [Topics Started](https://wordpress.org/support/users/maximgrachev/topics/)
 *   [Replies Created](https://wordpress.org/support/users/maximgrachev/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/maximgrachev/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/maximgrachev/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/maximgrachev/engagements/)
 *   [Favorites](https://wordpress.org/support/users/maximgrachev/favorites/)

 Search replies:

## Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Calculated Fields Form] Custom field value as checkbox "checked"?](https://wordpress.org/support/topic/custom-field-value-as-checkbox-checked/)
 *  Thread Starter [maximgrachev](https://wordpress.org/support/users/maximgrachev/)
 * (@maximgrachev)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/custom-field-value-as-checkbox-checked/#post-6547149)
 * Hi,
    Yes, exactly. I thought that omitting the step 5 would actually evaluate
   to the “current” post where the Form was inserted into. But it seems that this
   has to be hardcoded. Or as you say, use somehow a javascript function to create
   a variable with the post id.
 * Thanks. I’ll keep trying. Because my most difficult concern is that of being 
   able to “filter” the postmeta for the specific post where the form is in.
 * Thanks!!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Calculated Fields Form] Custom field value as checkbox "checked"?](https://wordpress.org/support/topic/custom-field-value-as-checkbox-checked/)
 *  Thread Starter [maximgrachev](https://wordpress.org/support/users/maximgrachev/)
 * (@maximgrachev)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/custom-field-value-as-checkbox-checked/#post-6547132)
 * Hi again,
    I thought the post_id is something like an “global variable”. And 
   can be easily accessible via a php function: get_the_id();
 * Anyways, I’ve tried the demo. I’ve created 3 posts, and put new CP_CALCULATED_FIELDS
   form, with a TEXT AREA DS field, which should provide the Post Id, at least that’s
   how I specified the options:
    Define datasource –> Post type Select Post Type–
   > Post type –> post Attribute for values –> ID
 * But it ALWAYS (in all 3 posts) evaluates to the first post created. I understood
   that this should fill the TEXT field with the ID of each post, but it only does
   so for the first post, not the other 2…
 * Am I missing something?
 * Thanks again!!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Calculated Fields Form] Custom field value as checkbox "checked"?](https://wordpress.org/support/topic/custom-field-value-as-checkbox-checked/)
 *  Thread Starter [maximgrachev](https://wordpress.org/support/users/maximgrachev/)
 * (@maximgrachev)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/custom-field-value-as-checkbox-checked/#post-6547106)
 * Yes, yes, everything works (connection, and query), but I guess that since the
   Post_id is not actually there (maybe the demo form is on a “page”, not a post,
   or something like that), it probably does not evaluate as I need it to.
 * I’ll keep trying, but it seems that the Developer would be the option for me.
   I guess that the other versions do not support Database accesses.
 * Thanks a lot! You’re probably the one that will solve this 🙂 I’ve been looking
   for a solution for months now, haven’t been able to start the website going, 
   because I needed this “feature”.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Calculated Fields Form] Custom field value as checkbox "checked"?](https://wordpress.org/support/topic/custom-field-value-as-checkbox-checked/)
 *  Thread Starter [maximgrachev](https://wordpress.org/support/users/maximgrachev/)
 * (@maximgrachev)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/custom-field-value-as-checkbox-checked/#post-6547103)
 * Wow! That may even work 🙂 I’ve tried using the DEMO with a connection to my 
   database, and I am almost there…
 * But do I have to use javascript? Can’t I pre-populate a hidden field or something
   like that with the POST_ID? I’ve seen something like that in the demo, but haven’t
   been able to use it.
 * And then it would only be a matter of:
 * `SELECT meta_value as value, meta_value as text FROM wp_postmeta WHERE post_id
   =<%fieldnameX%> AND meta_key='key_name'`
 * Right? Where fieldnameX is the hidden field, although as I said, I am not able
   to fill it this way. I get NULL value.
 * Thanks!!!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Calculated Fields Form] Custom field value as checkbox "checked"?](https://wordpress.org/support/topic/custom-field-value-as-checkbox-checked/)
 *  Thread Starter [maximgrachev](https://wordpress.org/support/users/maximgrachev/)
 * (@maximgrachev)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/custom-field-value-as-checkbox-checked/#post-6547070)
 * Sorry, my bad, the function is actually:
 * `<?php get_post_custom_values($key, $post_id); ?>`
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Calculated Fields Form] Custom field value as checkbox "checked"?](https://wordpress.org/support/topic/custom-field-value-as-checkbox-checked/)
 *  Thread Starter [maximgrachev](https://wordpress.org/support/users/maximgrachev/)
 * (@maximgrachev)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/custom-field-value-as-checkbox-checked/#post-6547068)
 * Hi,
 * Thanks. I have no problem in purchasing the Developer version. I just don’t want
   to purchase something that in the end may not suffice (and I guess there is no
   money back guarantee 🙂 ).
 * What I wanted, is just to associate somehow the value of the price of a house.
   This price is in a custom field (for example: ‘_listing_price’). And I’ve seen
   there is a wordpress function to access these custom fields’ values:
 * `<?php get_post_custom_keys($post_id); ?>`
 * What I wanted to know is if there is a way to use that for the checkboxes. Even
   if it actually means assigning the value to a hidden field, and using that field
   for the checkbox. I just want the value. I don’t know if there are any tutorials
   maybe about this. Usually I have everything in my head, but can’t explain it 
   easily enough :S
 * Maybe as an example (currently using NinjaForms, but not working): [http://www.supercastor.net/wordpress/listings/castellon-65-m2-ytong/](http://www.supercastor.net/wordpress/listings/castellon-65-m2-ytong/)
 * Price would the custom field “Precio básico”, which evaluates to 19000
 * Thanks!!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Ninja Forms - The Contact Form Builder That Grows With You] Reactivate Error](https://wordpress.org/support/topic/reactivate-error/)
 *  [maximgrachev](https://wordpress.org/support/users/maximgrachev/)
 * (@maximgrachev)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/reactivate-error/#post-6015526)
 * I found a solution, but I don’t know if it is the optimal, or what…
 * I found the code under Github from version 2.9.7 for the same part, and just 
   substituted, reactivated, and it worked… for now I’ll cross fingers that they
   get out a new update with the REAL fix… anyways:
 * 2.9.8 (BAD, error!):
 * `$f_id = $f_id ?: nf_insert_object( 'form', $form['id'] );`
 * 2.9.7 (Fixed):
 * `$f_id = isset ( $f_id ) ? $f_id : nf_insert_object( 'form', $form['id'] );`
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Ninja Forms - The Contact Form Builder That Grows With You] Reactivate Error](https://wordpress.org/support/topic/reactivate-error/)
 *  [maximgrachev](https://wordpress.org/support/users/maximgrachev/)
 * (@maximgrachev)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/reactivate-error/#post-6015520)
 * Same error I get. I cannot understand the line 83 either, so I don’t know if 
   deactivating (commenting) would help anything, or break more stuff…
 * `$f_id = $f_id ?: nf_insert_object( ‘form’, $form[‘id’] );
 * I just hope they find a solution fast!!

Viewing 8 replies - 1 through 8 (of 8 total)