Jump to content

Placeholder on Text field


matjazp
 Share

Recommended Posts

Hi, I have some questions:

  1. How to access placeholder value on textfields in templates(.php)? eg. $var = $page->mytextfield->placeholdervalue;
  2. How to use pwlink, used in ckeditor, in templates (APIs)? I could create my own fields but why invent the wheel? (Wishlist: add fullscreen plugin to ckeditor ).
  3. How to replace file in File field type and preserve file name and position (now I delete the file, add new one, move to the right position, very annoying).
  4. How to prevent file name modification when uploading file (eg. don't want blanks get replaced with underline)?
Link to comment
Share on other sites

1.) $var = $page->mytextfield->placeholder

2.) don't know

3.) no, you can't do what you are requesting; if you need that behavior, use repeaters.

4.) you can't, the filenames need to be sanitized, and also they need to be maximally compatible, which is why lowercase and no spaces - also no international characters (though there is still a bug with uploading files that contain characters with accents etc.)

  • Like 1
Link to comment
Share on other sites

1.) Didn't know its that easy :)

3.) I ended up using pages (like 100 of them, growing each month, used as minutes of a meeting) with just title and file field. Page title is used as description. That also gives me an option to sort pages by -created (newest on top), and also gives an option to create new page from the "Add New". 

4.) International characters gets deleted, they should be replaced (š->s, ž->z et c) like when slug is created from title.

Link to comment
Share on other sites

4.) International characters gets deleted, they should be replaced (š->s, ž->z et c) like when slug is created from title.

This is also discussed in GitHub issues #305 and #421. I've just added another notify to #305, hoping that Ryan will pick it up and re-open the issue.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...