+ Reply to Thread
Results 1 to 10 of 10

Thread: Change -select category- on select menus

  1. #1

    Change -select category- on select menus

    Hello Flynax Team,

    Sorry I have duplicated (similar message)

    https://forum.flynax.com/showthread....-category-text

    I want to change the -select category- (default text) on the select menus, I know I can search in the languages area to change, but I have a different reason. I want to make all the selects say what they are. Ex: for the country select, change to select country. Is there a short way to do this, it's can take valued time from me.
    Last edited by Brian Jester; October 21, 2019 at 04:45 PM.
    Thank you - Your Welcome
    Brian

  2. #2
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,183
    Hello,

    you need to change default text for 'select' fields in all search files from tpl > blocks starting with 'fields_search...'

  3. #3
    Quote Originally Posted by Rudi View Post
    Hello,

    you need to change default text for 'select' fields in all search files from tpl > blocks starting with 'fields_search...'
    Rudi,

    Thank you again, I have been able to add the placeholders, but only to a few of the text inputs, and also change only some of the select menus text. I have only been able to modify the default fields (which is good) but I also want to modify the fields that I added. Where can I change them?

    Ex: On the add listing page for the employment listing type, in the first group (employment) I can't find out where to change the default text in the select menus from select category to something like Select Employment Type. There is one thought I have left for this situation, which is to add the actual div into the template and attach the id to it, but then I won't be able to adjust it on the form. Is this the trade off that must be used if I want to style custom fields?

    Also, for the default email address field, I have modified the placeholder, but the email placeholder is also on the zipcode field and the street address field.

    Forgot to mention the description and additional information fields also don't have placeholder text, can that be accomplished?
    Last edited by Brian Jester; October 22, 2019 at 12:45 PM.
    Thank you - Your Welcome
    Brian

  4. #4
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,183
    For add listing page you should modify field.tpl as was mentioned in other thread

    in select case add a condition for default option checking your field:

    Code:
    Only registered members can view the code.
    to use placeholder in textarea use placeholder attribute inside the textarea element of textarea case:

    <textarea placeholder="YOUR TEXT"></textarea>


    for proper placeholder text use the same condition:

    Code:
    Only registered members can view the code.

  5. #5
    Hello Rudi,

    Thanks again for your reply! Do I need to create the phrase keys using the language editor, or are the phrase keys already there? I haven't already created them, and I did a search for the phrase key 'description' (without single quotes) and I come up with 72 pages of results. I don't know what to look for, or should I just create phrase keys if I am not sure.

    Also, for the system module, (language area) - > (creating phrases) should I use common, user interface, administrator or Extjs?

    Quote Originally Posted by Rudi View Post
    For add listing page you should modify field.tpl as was mentioned in other thread

    in select case add a condition for default option checking your field:

    Code:
    Only registered members can view the code.
    to use placeholder in textarea use placeholder attribute inside the textarea element of textarea case:

    <textarea placeholder="YOUR TEXT"></textarea>


    for proper placeholder text use the same condition:

    Code:
    Only registered members can view the code.
    Last edited by Brian Jester; October 23, 2019 at 02:22 PM.
    Thank you - Your Welcome
    Brian

  6. #6
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,183
    You can create your lang phrases

    or use existing phrase searching them by exact key or phrase (check 'Exact match') and insert its key to the code

  7. #7
    Quote Originally Posted by Rudi View Post
    You can create your lang phrases

    or use existing phrase searching them by exact key or phrase (check 'Exact match') and insert its key to the code
    Ok,

    Edit: I made a mistake, as I described what I was going to try, which I did, and got a 0 in the output, likely because that was for selects not for text area which is what the description field is.

    I think I understand, but let me clarify the way I am going to try what you suggest and you tell me if I am correct. Although I may just create my own phrases (as that seems to be easier), I would like to test your way to see if I am catching on.

    In the ap->listings->listing fields I will use description as my first field. So I get the field key for description field and put that into your code for 'YOUR KEY', correct? Then I search for 'YOUR PHRASE KEY' in ap->language->english (or whatever language) and I found the one that I think would be the correct one called: In my case it's called: listing_fields+description+description_long so is that what I would put for the phrase key?

    I am going to try it in the mean time, but I wanted to post to see if I am on the right track.
    Last edited by Brian Jester; October 24, 2019 at 02:10 PM.
    Thank you - Your Welcome
    Brian

  8. #8
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,183
    Quote Originally Posted by Brian Jester View Post
    Then I search for 'YOUR PHRASE KEY' in ap->language->english (or whatever language) and I found the one that I think would be the correct one called: In my case it's called: listing_fields+description+description_long so is that what I would put for the phrase key?
    No, I mean for textarea placeholder you need to use some phrase created by you or already existing one with specific key

    'listing_fields+description+description_long' is related to field label/name

    you should use just a phrase key

    given that, I think you'd better create your own phrase and use it in textarea placeholder and for default select option

  9. #9
    Ok Rudi,

    Edit #3: Still not working, and I didn't notice the select category text because it's only showing in the car information group, because I am targeting the car fieldset, but it doesn't show the placeholder text using the code you provided. I put that code into the fieldset_header template at the bottom. Maybe you can take a look?

    Edit #2: I still don't have it working yet, but what I did to get rid of the -select category- text from the output of your code, was I removed your code from the field.tpl, and put it into the fieldset_header.tpl in the area with the if block that targets the vehicles category, now I don't get the select category text anymore, but I don't get anything. I guess it's a good thing, but I still don't see the placeholder text in the country select menu. I will try another select menu and post back. I am sticking with the vehicles category and not jump all over the place.

    Edit 1: Maybe it's not working because the country select is part of a multi select or does that make a difference?

    Update: I *still* don't have it working...I have created a new phrase in the language area of ap, used this code at the very bottom of the field.tpl file

    Code:
    Only registered members can view the code.
    and all I am getting in the output is: - Select a Category - and that is shown under each of the groups on the post ad page. Any ideas?




    I thought that would be best, at least for now. I am going to create a new phrase in ap->languages->en to see that the code you provided works, and I will post back with results in a couple of minutes.Edit: I am in the language area of the ap, which module should I select? Common, User Interface, Administrator, or Extjs. I just realized that after adding the phrase (set it to common) I could easily change it after if I set it incorrectly the first time. I have set it to common to test.
    Quote Originally Posted by Rudi View Post
    No, I mean for textarea placeholder you need to use some phrase created by you or already existing one with specific key'listing_fields+description+description_long' is related to field label/nameyou should use just a phrase keygiven that, I think you'd better create your own phrase and use it in textarea placeholder and for default select option
    Last edited by Brian Jester; October 25, 2019 at 03:26 PM.
    Thank you - Your Welcome
    Brian

  10. #10
    Any updates on this Rudi? Still need help with this issue.
    Last edited by Brian Jester; November 1, 2019 at 04:35 PM.
    Thank you - Your Welcome
    Brian

+ Reply to Thread