Events Made Easy Forums How do I … … insert value with php in eme_formfields.php in dynamic Formfields?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #57195
    Anonymous
    Inactive

    … Hello, I have a members plugin with custom fields, whose contents I have to enter in the custom fields of eme. Now I have seen that one could enter the contents by value in the fixed fields. But how do I get the value of the dynamically generated fields?

    Sincerley
    jfreakr

    #57197
    Franky
    Keymaster

    That’s outside the scope of EME, but you need to start by examining $_POST when entering a member. I’ll add an action hook for new members in the next version, so you can work based on that info.

    #57198
    Anonymous
    Inactive

    Thanks for your answer.

    Thank you for your reply. I have to do that somehow.
    In eme.formfields.php I added the following lines at about 1038:
           $ bookerPhone = get_user_meta ($ current_user-> ID, ‘phone1’, true);
           $ bookerFax = get_user_meta ($ current_user-> ID, ‘fax’, true);
    in about 1445 the phone is entered in the form:
              $ replacement = “<input $ required_att type = ‘tel’ name = ‘$ fieldname’ value = ‘$ bookerPhone’ $ dynamic_field_class />”;

    But the fax is a dynamic field. Do you have any idea how I get the member data in the value

    #57199
    Anonymous
    Inactive

    Or better, how can I pass the value hidden with the member data and hide the form.

    #57200
    Anonymous
    Inactive

    Ok, type = hidden is ok…. But I need a possibility to give the dynamic fields a $replacement string to add the value into it….

    Or can i put hidden Inputs with name=”FIELDxx” and the Value into the Code? Better Idea?

    #57213
    Anonymous
    Inactive
    $fax = eme_get_formfield("Fax");
     
    if($fax) {$fax["field_values"] = $bookerFax;} else {echo 'Das hat nicht geklappt!';}          
    echo '<pre>';                    
     var_dump($fax);
    echo '</pre>';

    I’m stuck here … The value in the array is changed, but that does not affect the form. I urgently need to get the dynamically generated fields (which I saved in a variable) into the value of the dynamically generated fields … Please Help

    #57214
    Anonymous
    Inactive

    Ok, I did it. Thank you for your patience…

    #57216
    Franky
    Keymaster

    Sorry, but I’ve been busy with other bugs, daily work and end-of-year preparations …
    Good you got it to work. The action hook eme_insert_member_action is in the latest version now and also documented.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘How do I …’ is closed to new topics and replies.
Scroll to Top