Forum Replies Created
- AuthorPosts
haritos
ParticipantOk! Thank you for all!
haritos
ParticipantI have one more question.. I want to use 2 Facebook Like buttons with html element but i want to hide the second Facebook Like button and make it appear when the first button has been liked. Is this possible with the conditional logic?
haritos
ParticipantI found it.. All the changes can be made with the text import wizard.. Thank you Ally!
You have the best support ever!
haritos
ParticipantThank you for your quick reply! I fixed that problem but i want to ask one more thing… Can i use instead of commas the data in different cells? How can i do this?
haritos
ParticipantExcellent support!
May 24, 2013 at 1:52 pm in reply to: How to remove the [raw] and display problem with reCAPTCHA? #4539May 24, 2013 at 11:51 am in reply to: How to remove the [raw] and display problem with reCAPTCHA? #4535haritos
ParticipantThank you josef777, the [raw] issue is solved. Also i have a problem with the reCAPTCHA as it seems not been displayed well. Do you have a solution for this problem?
haritos
ParticipantIt seems that there is not a PHP error because i debug it and there is no recent error written in the debug log. What exactly “Update active themes cache” does? Because i use a child theme if that matters…
haritos
ParticipantHi Ally,
How can i autopopulate a date from the form to the Advanced custom field?
I use a date picker so what i have to do?
haritos
ParticipantI did it but nothing changed!
Where do i have to put the array for the checkboxes?
array(
0 => 'Chosen Option 1',
1 => 'Chosen Option 2'
)
How the whole code i gave you, should look like?
haritos
ParticipantThanks for the notification but where do i have to put the checkbox array?
i use this code:
add_action('iphorm_post_process_1', 'mytheme_create_wp_post', 10, 1);
function mytheme_create_wp_post($form)
{
$title = $form->getValue('iphorm_1_1');
$content .= 'Δώρα διαγωνισμού: ' . $form->getValueHtml('iphorm_1_30') . '<br />';
$content .= 'Κατηγορία διαγωνισμού: ' . $form->getValueHtml('iphorm_1_39') . '<br />';
$content .= 'Διοργανωτής διαγωνισμού: ' . $form->getValueHtml('iphorm_1_36') . '<br />';
$content .= 'Απαιτείται λογαριασμός Facebook: ' . $form->getValueHtml('iphorm_1_45') . '<br />';
$content .= 'Περιορισμός περιοχής: ' . $form->getValueHtml('iphorm_1_15') . '<br />';
$content .= 'Ημερομηνία λήξης: ' . $form->getValueHtml('iphorm_1_8') . '<br />';
$content .= 'Ώρα λήξης: ' . $form->getValueHtml('iphorm_1_9') . '<br />';
$content .= 'Όροι διαγωνισμού: ' . $form->getValueHtml('iphorm_1_32') . '<br />';
$content .= 'Πληροφορίες διαγωνισμού: ' . $form->getValueHtml('iphorm_1_35') . '<br />';
$link .= 'Link διαγωνισμού: ' . $form->getValueHtml('iphorm_1_11') . '<br />';$post = array(
'post_title' => $title,
'post_content' => $content,
'post_status' => 'draft'
);$post_id = wp_insert_post($post);
add_post_meta($post_id, 'dwra_diagwnismou', $form->getValue('iphorm_1_30'));
add_post_meta($post_id, 'category', $form->getValue('iphorm_1_39'));
add_post_meta($post_id, 'diorganwths_diagwnismou', $form->getValue('iphorm_1_36'));
add_post_meta($post_id, 'apaitei_logariasmo_facebook', $form->getValue('iphorm_1_45'));
add_post_meta($post_id, 'periorismos_perioxhs', $form->getValue('iphorm_1_15'));
add_post_meta($post_id, 'hmeromhnia_lhkshs', $form->getValue('iphorm_1_8'));
add_post_meta($post_id, 'wra_lhkshs', $form->getValue('iphorm_1_9'));
add_post_meta($post_id, 'link_diagwnismou', $form->getValue('iphorm_1_11'));
add_post_meta($post_id, 'oroi_diagwnismou', $form->getValue('iphorm_1_32'));
add_post_meta($post_id, 'plhrofories_diagwnismou', $form->getValue('iphorm_1_35'));// Add attachments
$file = $form->getValue('iphorm_1_10');if (isset($file[0]))
{
$file = $file[0];
$filename = $file['text'];
$path = $file['fullPath'];$wp_filetype = wp_check_filetype($filename, null);
$attachment = array(
'post_mime_type' => $wp_filetype['type'],
'post_title' => sanitize_file_name($filename),
'post_content' => '',
'post_status' => 'inherit'
);$attach_id = wp_insert_attachment($attachment, $path, $post_id);
require_once(ABSPATH . 'wp-admin/includes/image.php');
$attach_data = wp_generate_attachment_metadata( $attach_id, $path );
wp_update_attachment_metadata( $attach_id, $attach_data );set_post_thumbnail( $post_id, $attach_id );
}}
haritos
ParticipantHi Ally,
You are totally right!
I have one more problem.. It may be yours or the ACF Plugin!
I have three fields in the ACF and i want to autofill them with the submitted form data. I can do this for all other fields but with these three i can’t!
The fields are a date picker, a text and a checkbox.
Can you help me?
May 2, 2013 at 8:29 am in reply to: How to autofill the Advanced Custom Fields with the form's data? #4222haritos
ParticipantHello Ally,
I’ve added the code below and works fine:
add_post_meta($post_id, 'link_diagwnismou', $form->getValue('iphorm_1_11'));
Thank you for all!
By the way, use gave me a code to insert the submitted image into the post but by inserting the code in the functions.php an error occurs. This is the code you gave me:
// Insert the post
$post_id = wp_insert_post($post);// Add attachments
$file = $form->getValue('iphorm_2_4');if (isset($file[0])) {
$file = $file[0];
$filename = $file['text'];
$path = $file['fullPath'];$wp_filetype = wp_check_filetype($filename, null);
$attachment = array(
'post_mime_type' => $wp_filetype['type'],
'post_title' => sanitize_file_name($filename),
'post_content' => '',
'post_status' => 'inherit'
);$attach_id = wp_insert_attachment($attachment, $path, $post_id);
require_once(ABSPATH . 'wp-admin/includes/image.php');
$attach_data = wp_generate_attachment_metadata( $attach_id, $path );
wp_update_attachment_metadata( $attach_id, $attach_data );set_post_thumbnail( $post_id, $attach_id );
And you also told me to make a change in this:
$value = array(
'url' => iphorm_get_wp_uploads_url() . '/' . $result['path'] . $filename,
'text' => $filename
);To this:
$value = array(
'url' => iphorm_get_wp_uploads_url() . '/' . $result['path'] . $filename,
'text' => $filename,
'fullPath' => $fullPath
);Please can you tell me what might be the problem?
haritos
ParticipantHey Ally,
Can you help me on how to insert an image tp the post uploaded via the form?
You gave me this code:
// Insert the post
$post_id = wp_insert_post($post);// Add attachments
$file = $form->getValue('iphorm_2_4');if (isset($file[0])) {
$file = $file[0];
$filename = $file['text'];
$path = $file['fullPath'];$wp_filetype = wp_check_filetype($filename, null);
$attachment = array(
'post_mime_type' => $wp_filetype['type'],
'post_title' => sanitize_file_name($filename),
'post_content' => '',
'post_status' => 'inherit'
);$attach_id = wp_insert_attachment($attachment, $path, $post_id);
require_once(ABSPATH . 'wp-admin/includes/image.php');
$attach_data = wp_generate_attachment_metadata( $attach_id, $path );
wp_update_attachment_metadata( $attach_id, $attach_data );set_post_thumbnail( $post_id, $attach_id );
And you told me to add this:
$value = array(
'url' => iphorm_get_wp_uploads_url() . '/' . $result['path'] . $filename,
'text' => $filename,
'fullPath' => $fullPath
);But it gives me an error!
Please help!
haritos
ParticipantYes i saw it!
Thank you!
- AuthorPosts