Jump to content

Search the Community

Showing results for tags 'Fieldtype'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

  1. I want to create a fieldtype Fields which in the config can be set as single or multi-value, and optionally filter available options dynamically according to a specified template field (using something like FieldtypeTemplates or FieldtypeSelectExtOption or even FieldtypeText). FieldtypePage can do this by including another page field in the selector, it can be a child dependent on its value... Could anyone just provide me with a starter guide? I'm looking at other modules for insight but ultimately remain lost. Thanks so much.
  2. Hi there, my problem is to understand how i can create my own fieldtype. I look into the Events Fieldtype Topic but i don't find any tutorial like creating Processwire Modules. A look into the code dose not help me. The field i want to create stores multiple informations like a address field. "IP, Connection, Hardware, Firmware, Lat, Long" For this i need a FieldtypeNode.module and ImputfieldNode.module right? But what do i need insight this two modules? Where to set the database schema? Much things are so easy in ProcessWire but this let me stuck.
  3. I'm using "quiet" saving in the Webmention module and was wondering if that prevents the page's cache from being cleared. I'm just using the built-in page caching with the option "Clear cache for saved page only (default)" If it matters, the page-save I'm calling is specifying the Webmention Field, rather than just $page->save(); For reference, the code is https://github.com/gRegorLove/ProcessWire-Webmention/blob/master/Webmention/Webmention.module#L840
  4. How do I get the output of a field that is a FieldTypePage? I've tried echo $page->first_name . " "; but it just prints numbers instead of picking data from that page it's referencing to. Couldn't find any info on how to use this module/field either.
  5. I have option fieldtype with 4 elements. Many pages has this field type. On another page i want to be able to select items from pages where this option fieldtype presents using asm select. And it would be easier that when i need to select page i'll see not only {title} but better {title}-{option.title}. So here what i got: Manager name - <ul><li>option selected</li></ul>. That's no got. And the question as i see is how to remove any html tag from cutom output label format for option fieldtype. Thanks a lot. Here is screenshots to better understand
  6. Solved below I'm wondering how to properly implement a find() method for a Fieldtype so it can be used in an API-y way. When I set up the FieldtypeWebmentions I used FieldtypeComment as a basis. It includes a find() method, which I'm not entirely sure I understand, or is even what I need. What I want to do (from elsewhere in my code) is perform a search across the webmention field for a certain author email, like: $page->Webmention->find('author_email=user@example.com'); I've looked at http://processwire.com/api/modules/ and the Fieldtype Map Marker as an example, but it is still a bit opaque to me what the Right Way™ is. Is it actually the getMatchQuery() method I need to implement? Thanks for any help!
  7. So, I've been wondering (since this evening) if it would be possible to extend default integer field with two features / settings: signed / unsigned size (nothing too fine-grained, most importantly INT, BIGINT and perhaps something like TINYINT) The main reason I'm suggesting this is that I've banged my head on a wall that is int(11) couple of times now and I'd very much prefer having better option than using a text field in those cases. Sure, a text field combined with proper filtering + sanitizing usually gets the job done just fine, but at the same time it feels more than a bit hackish and introduces yet another chance for human error to thrive. Signed / unsigned part would be just a "nice to have" extra feature and probably wouldn't be of use for most PW users, but from a DB design point of view it would make a heck of a lot of sense; if I'm only interested in positive integers (which is almost always the case, by the way) why would I allow negative input and especially if I'm not allowing it at UI level then why should it be allowed at DB level? Oh, and that extra space "unsigned" results in is a nice bonus I do know that this would be quite easy to put together as a new fieldtype, but I wanted to try tossing it around here first, just in case that someone else would feel that it'd be worth adding to built-in field. Obvious downside of this whole idea is that changing settings like these would require changes to DB schema, so what I'm asking for may not be possible at all -- in which case I'm probably just going to put together a new "big integer" field..
  8. I was struggling a bit getting all subfields of a field if type is unknown. I made a small function for use in templates which returns an array() of all properties of (maybe any?) pagefieldvalue. If there is something similar in core (which I couldn't find) please let me know. Tested it with Fiedtype Options, Page, ProfieldsTable. Feel free to use it. /** * ProcessWire UsefulSnippets * * How to get all properties, subfields of any field if you don't know the type only if value is set * @return array */ function getProperties($fieldvalue) { // multiple value field if ($fieldvalue instanceof WireArray) { $result = array(); foreach ($fieldvalue as $subfieldvalue) { $result[] = getProperties($subfieldvalue); } return $result; // single value field with subfields } else if ($fieldvalue instanceof WireData) return get_object_vars($fieldvalue->getIterator()); // single value field else return $fieldvalue; } // Example var_dump(getProperties($page->myfield));
  9. Is there a example / howto write custom fieldtype / inputfield module? Searched the forum and asked google. If there is no howto available someone could suggest an easy module to take a look at the source code.
  10. Is it possible to upload zip file, unarchive it with save it structure? Thanks!
  11. I created fieldtype "select" for template (0:=Prepared, 1:=Done) And need to make for list of pages with this template value for this fieldtype to "1" from. There are to many pages to do it manualy. How to make it?
  12. Hello, I'm a true beginner at processwire and this is my first post! So first of all I would like to address my cordial greeting to all of you What i want to know is how to handle a bootstrap list with field types in processwire. I could use a simple text input field with commas and cut them for iterating but this is not a good solution. And the other problem is that i also want to implement the bootstrap-tooltip (see attached image file) What is the best solution for this problem? Thank you very much in advance for your answer. regards, Gerald
  13. Hello, My Goal: To create a custom module that will take an array of images and generate a sprite sheet, as well as, the CSS to access each sprite. (This part I have completed ). To have it be a custom InputType, so that every image field does not create a sprite sheet. (Still needs to be completed). To create an admin page for the module to allow you to customize the output, size, etc. (Still needs to be completed). My Problems: Currently, it is looking at a specific folder that is hardcoded in the module, and creating a sprite sheet from those images. I suspect that creating a custom InputType would allow me to have the folder dynamically set based on the page that is using the module. I am struggling on finding the proper documentation that would allow me to do that. I also, have created a "Create Sprite Sheet" button and have it hooked after the page save button... on every page, even if there isn't an image upload on that page .I would like the create sprite sheet functionality to be hooked to the actual page save button only on the pages that have the custom InputType that needs to be created - mentioned above. I'd appreciate any help/direction provided, to help me achieve my goals. Also, if anyone has any recommended features that they think would be helpful as a part of this module, please feel free to make suggestions. Thanks in advance.
  14. Is there a way to select an image from another image field on the page, much the same way as CKEditor fields can when embedding images? Why not just use an ordinary image field? Because in my case, I have a repeater for creating a home page carousel for featured news items. Each row in the repeater has an image field. Sometimes you want to be able to use the same image for more than one slide. Currently you have to upload the same image to each row. And if you need to replace an image but know you'll need to use it again at a future date, you have to leave it attached to the image field but move it away from the first position so any new images can be first instead. So each row ends up with 5-6 different images that are used frequently for different types of topics, which is a) a bit untidy, and b) means you have to repeatedly upload common images, i.e. duplication of effort. It would be better if I could have a global images field for the page, and then in each repeating row, a fieldtype that can choose an existing image from that field. I thought about using a CKEditor fieldtype, but that generates all the markup too, and I don't want to do that as the markup will be generated with dynamic image sizes in the template. I also know of the image manager module that Soma made but that's not really what I'm after either. Is there any way to accomplish this?
  15. I see a fieldype made by Hanni; and i have a question with multi language; there's a way to made this fieldtype to save to multiLanguage processwire 2.5.* ? The module is: https://github.com/Hani79/Processwire_FieldType_Select_Drop_Down PD: i know there's a page fieldtype; but i dont wanna use that cause the final user dont need to see a page with 30 children for 1 category dropdown. Regards,
  16. I don't now if this is already possible to build with one of the available modules/fieldtypes. I so far tried Table, PageTable, Repeater and Multiplier but couldn't get them work exactly as I want. I'm looking for a way to create a matrix/table that uses the children of two pages to build the row and column headers. In my case (an online shop), I want it to take the children of the page product variants and the children of the page currencies. In the end, it should render a matrix/table, where I can enter a fixed price for every variant in every currency. Has anyone ever done something similar? Is there a fieldtype for this?
  17. Hello all, I'm working on a travel directory site with locations of the region I live in in Thailand. This is a private fun learning project. I would like to assign an icon to each location. ATM I have a simple text input field in my location template where I manually type in the fontawesome class name for the icon I want to assign which is a bit tedious. So I am thinking about putting together an Inputfieldtype "Icon" which will surely aid in learning PW module development (and some more PHP along the way) My concept so far: -since people will hardly use all 500+ icons on their sites, I want to use an asm select in the field setup to search and select the icons that we want to use -the asm select should show both, the icon and it's class name for each icon -then use the selected icons to populate a select dropdown field as input field where the user can choose an icon. Which inputfield module could I have a look at that is using asm select in the field setup? I used import.io (which really is a fun tool) to create a data set with all fontawesome4.2.0 icon class names and their unicodes. If you're interested you can see the dataset here (you need to login/signup with them first). I can export the dataset as JSON and use that to populate the asm select for the field setup. These are my ideas so far. Yours are always welcome
  18. Not sure if I am approaching this right. Say I have a project page. Each project could have multiple organisations working on it. So I used a page fieldtype and this allows me to select the relevant organisation... if it exists. Then I saw that you could select the ability to add a new 'organisation' (page) in this case. This works fine if all I want to do is create a new organisation name, but how would I also add the other fields for the organisation like address, city, etc? As I said , I may be barking up the wrong tree, but any pointers appreciated.
  19. Hi Everyone, a quick and stupid question: how do I insert image description in images field when I set the default view to "grid" ?
  20. Hi again, I have another dummy question about Select field use. I made the field "boardbasis" with select options: 1:=Breakfast 2:=Catered 3:=Self-catered In template I use $page->boardbasis to extract result from "boardbasis" Select field. As a result I get on page "1 or 2 or 3" (just pointed numbers). What should I do achieve as a result "Breakfast or Catered"? Thanks a lot for your assistant. Have a great weekend, a.
  21. I think it would be nice to add an option (e.g. a simple checkbox) to the settings page of the repeater FieldType for adding a new item from the top, not from the bottom (and consequently also reverse the order of the items). So instead of repeater item #1 repeater item #2 repeater item #3 repeater item #4 (here appears a new item) + Add Item it would look like this + Add Item (here appears a new item) repeater item #4 repeater item #3 repeater item #2 repeater item #1 Especially useful when having lots of repeater items. Does that sound reasonable to you? Is it already intended to add the option? Thanks.
  22. Hello everyone, I'm new to ProcessWire, and (this may sound cliché but) it's awesome... I've only used it for 3 days and already modified some of the admin UI for ease of use and configured a toolbar. Today I was creating a module but I'm not really PHP-saavy, so when I got this error, I was pretty much stuck: Fatal error: Cannot instantiate abstract class Inputfield in C:\xampp\htdocs\processwire\wire\core\Fieldtype.php on line 79 This module uses the integer inputfield and the page inputfield, I noticed that on Fieldtype.php, line 78 says: "// TODO make this abstract" so I'm wondering if that could have something to do with the fact that it's not working or if there's something wrong with my code. Thanks in advance. //Nicole
  23. Hello everyone, I'm currently working on a simple module (view this thread for more details) and ran into some problems with the validation of input data. I did some research, but I wasn't able to find answers to these questions: 1. If you develop your own Inputfield/Fieldtype module, where do you do validation? I've seen other modules do it in Fieldtype::sanitizeValue() (apigen), but this seems rather strange to me. Also, as far as I got it, they didn't throw any errors back to the user but just quietly changed everything, that doesn't make sense without the user knowing it. This leads to the next questions: 2. What is the correct way to get visual validation error reports to the user? 3. How to prevent a page from saving with validation errors? With this fairly basic stuff (where I wasn't really able to find something meaningful about) out of the way, what I really want to know is this: 4. How do you add validation with error reporting to an existing Fieldtype module? I want to add my custom validation with error reporting to the standard FieldtypeTextarea module (only when some conditions are meet in the corresponding Inputfield for sure), but I have no clue what would be the way to go there and wasn't able to find any module that does it like this. Please shed some light on these question, would be very much appreciated! Marc
  24. Hello everyone, I'm using the URL fieldtype to provide an alternative url for some pages but now I need the ability to use, like the title says, GET parameters or url hashes. It seems that is unsupported right now, so I would like to ask you good fellows if you have been in the same situation and if there's a solution to this? Thank you very much.
×
×
  • Create New...