Placeholder on the add-listing page
This topic contains 8 replies, has 4 voices, and was last updated by Naveen Giri 4 years, 11 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
April 3, 2020 at 1:17 pm #538257
I love the placeholders on the add-listing page, they make it easy for users to see what they should enter in the field.
My URL field placeholders are not working. Can you take a look? I hav tried everything I could think of; your help in this matter would be great to have.
Thanks
April 3, 2020 at 1:28 pm #538264Hi Alexander,
Thanks for your post. Try clicking on the “Show Advanced” option and you should see the placeholder option as shown in the attached image.
April 3, 2020 at 1:34 pm #538269This reply has been marked as private.April 3, 2020 at 1:40 pm #538276This reply has been marked as private.April 5, 2020 at 6:17 am #538550Hi Alexander,
the issue is coming from the Listimia theme.
You can let them know about the issue to fix it in the theme.meanwhile, you can use this code snippet.
/** * Get the html input for the custom field: url * * @param string $html The html to be filtered. * @param array $cf The custom field array details. * @since 1.6.6 * * @return string The html to output for the custom field. */ function custom_listimia_cfi_url($html,$cf){ $html_var = $cf['htmlvar_name']; // Check if there is a custom field specific filter. if(has_filter("geodir_custom_field_input_url_{$html_var}")){ /** * Filter the url html by individual custom field. * * @param string $html The html to filter. * @param array $cf The custom field array. * @since 1.6.6 */ $html = apply_filters("geodir_custom_field_input_url_{$html_var}",$html,$cf); } // If no html then we run the standard output. if(empty($html)) { ob_start(); // Start buffering; $value = geodir_get_cf_value($cf); if ($value == $cf['default']) { $value = ''; }?> <div id="<?php echo $cf['name'];?>_row" class="<?php if ($cf['is_required']) echo 'required_field';?> geodir_form_row clearfix gd-fieldset-details form-group"> <label for="<?php echo $cf['name'];?>"> <?php $frontend_title = __($cf['frontend_title'], 'listimia'); echo (trim($frontend_title)) ? $frontend_title : ' '; ?> <?php if ($cf['is_required']) echo '<span>*</span>';?> </label> <input field_type="<?php echo $cf['type'];?>" name="<?php echo $cf['name'];?>" id="<?php echo $cf['name'];?>" <?php if(!empty($cf['placeholder_value'])){ echo 'placeholder="'.esc_html__( $cf['placeholder_value'], 'geodirectory').'"'; } ?> value="<?php echo esc_attr(stripslashes($value));?>" type="url" class="geodir_textfield form-control" oninvalid="setCustomValidity('<?php _e('Please enter a valid URL including http://', 'listimia'); ?>')" onchange="try{setCustomValidity('')}catch(e){}" /> <span class="geodir_message_note"><?php _e($cf['desc'], 'listimia');?></span> <?php if ($cf['is_required']) { ?> <span class="geodir_message_error"><?php _e($cf['required_msg'], 'listimia'); ?></span> <?php } ?> </div> <?php $html = ob_get_clean(); } return $html; } remove_filter('geodir_custom_field_input_url','geodir_cfi_url',10,2); remove_filter('geodir_custom_field_input_url','listimia_cfi_url',10,2); add_filter('geodir_custom_field_input_url','custom_listimia_cfi_url',10,2);
Regards
NaveenApril 6, 2020 at 10:40 am #538693Hello,
It was a bug, thank you for reporting is.
It’s fixed and the fix will be in the next release.I sent you a hotfix.
Sorry for any inconvenience
April 7, 2020 at 7:36 am #538846Thanks Rachid.
April 9, 2020 at 12:54 pm #539265This reply has been marked as private.April 9, 2020 at 1:07 pm #539267Hi Alexander,
can you please create a new task for it. It seems the current task is already resolved.
Kind Regards
Naveen -
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket