Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author donmik

    (@atallos)

    Hi,

    What default value ? There is no way you can define in the wordpress admin a default value for the fields you create.

    If I leave it blank, the field won’t show anything on it. Can you show me a picture or send me a link to see it ?

    Thread Starter pfrey

    (@pattyfresonke)

    I guess maybe default value was the wrong way to put it, but when the field is ’empty’ it shows ‘helper text’ maybe? here’s a screenshot

    [email protected]’ and ‘https://yourwebsite.com’ show up in the text boxes and are saved if nothing else is put in them.

    Thread Starter pfrey

    (@pattyfresonke)

    So if a user goes in and say, doesn’t have Facebook or Twitter, they enter their email ([email protected]) and click Save, their profile will show:
    profile result

    Plugin Author donmik

    (@atallos)

    In my plugin, there is no default value, but there is a placeholder attribute. What you are seeing in the form is the placeholder value. The placeholder of the field cannot be saved. If you don’t write anything, the field remains empty, so there is another thing that is interfering here.

    To check if you are seeing a placeholder or not in the form you can search in the html code for the attribute placeholder in your field or simply click on the field and start writing, if the value disappears then it was a placeholder.

    Thread Starter pfrey

    (@pattyfresonke)

    That’s where I’m confused, because it does act like a placeholder (couldn’t think of that word before ?? ), when I click in the field it goes away, but for some odd reason they are being saved without me typing anything in the field…

    Thread Starter pfrey

    (@pattyfresonke)

    But then when I go and look….It looks as though something is wrong…not showing ‘placeholder’ in the code on the page no placeholder?

    Plugin Author donmik

    (@atallos)

    It’s really weird… I don’t know why it’s doing this. If you want, you can try to delete placeholder and don’t show anything, at least there is no default values saved wrong.

    To do this you need to search “bxcft_edit_render_new_xprofile_field” function in my plugin and in this function I create all the fields. Look for :
    elseif ( bp_get_the_profile_field_type() == 'web' ) {
    and delete the placeholder.

    Thread Starter pfrey

    (@pattyfresonke)

    Sorry I didn’t get back to you! But I went ahead and did that, seeing as there was no other solution…and that of course worked since the placeholder was completely removed.

    Thanks!

    Plugin Author donmik

    (@atallos)

    Don’t worry! You’re welcome.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Web and Email holding default value’ is closed to new replies.