Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter maximgrachev

    (@maximgrachev)

    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!!

    Thread Starter maximgrachev

    (@maximgrachev)

    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!!

    Thread Starter maximgrachev

    (@maximgrachev)

    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”.

    Thread Starter maximgrachev

    (@maximgrachev)

    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!!!

    Thread Starter maximgrachev

    (@maximgrachev)

    Sorry, my bad, the function is actually:

    <?php get_post_custom_values($key, $post_id); ?>

    Thread Starter maximgrachev

    (@maximgrachev)

    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): https://www.supercastor.net/wordpress/listings/castellon-65-m2-ytong/

    Price would the custom field “Precio básico”, which evaluates to 19000

    Thanks!!

    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'] );

    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)