Events Made Easy › Forums › How do I … › … insert value with php in eme_formfields.php in dynamic Formfields?
- This topic has 7 replies, 2 voices, and was last updated 7 years, 10 months ago by
Franky.
-
AuthorPosts
-
Mon 18 Dec 2017 at 15:07 #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
jfreakrMon 18 Dec 2017 at 16:03 #57197Franky
KeymasterThat’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.
Mon 18 Dec 2017 at 16:17 #57198Anonymous
InactiveThanks 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
Mon 18 Dec 2017 at 16:22 #57199Anonymous
InactiveOr better, how can I pass the value hidden with the member data and hide the form.
Mon 18 Dec 2017 at 16:52 #57200Anonymous
InactiveOk, 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?
Wed 20 Dec 2017 at 10:27 #57213Anonymous
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
Wed 20 Dec 2017 at 11:45 #57214Anonymous
InactiveOk, I did it. Thank you for your patience…
Wed 20 Dec 2017 at 15:43 #57216Franky
KeymasterSorry, 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. -
AuthorPosts
- The forum ‘How do I …’ is closed to new topics and replies.