Robin S Posted November 19, 2016 Share Posted November 19, 2016 Image & File Dependencies Allows Image and File fields to be used in inputfield dependency selectors. Note: prefix field names with an underscore in your dependency selectors. Usage Install the ImageFileDependencies module. You can now create an inputfield dependency based on the number of images or files added to a Image or File field. When you create an inputfield dependency for a Image or File field, prefix your field name with an underscore. Example for a field named 'images': _images>3 Note that you do not include a '.count' subfield in the selector. https://github.com/Toutouwai/ImageFileDependencies Demo 16 Link to comment Share on other sites More sharing options...
szabesz Posted November 20, 2016 Share Posted November 20, 2016 Oh yes, this is great! Thanks for sharing 1 Link to comment Share on other sites More sharing options...
Robin S Posted November 20, 2016 Author Share Posted November 20, 2016 @szabesz, glad you approve. I have plans for another module relating to inputfield dependencies. Watch this space. 1 Link to comment Share on other sites More sharing options...
owzim Posted November 20, 2016 Share Posted November 20, 2016 @Robin S looks great, thanks. Can you name a use case? On a side note: What are you using to record the screen and export to gif? I tried gifrocket, but even with a small framerate, files get pretty large. Yours is tiny, I like it. 1 Link to comment Share on other sites More sharing options...
szabesz Posted November 20, 2016 Share Posted November 20, 2016 On 11/20/2016 at 10:28 PM, owzim said: What are you using to record the screen and export to gif? Expand Maybe this one (LICEcap)? 1 Link to comment Share on other sites More sharing options...
Robin S Posted November 20, 2016 Author Share Posted November 20, 2016 On 11/20/2016 at 10:28 PM, owzim said: Can you name a use case? Expand The use cases are the same as those for any inputfield dependency: you want to show or require one field based on the state of another. This module just adds Image and File fields to the types of fields you can use in an inputfield dependency selector. Off the top of my head: you have an images field for an optional gallery and you want to remind the site editor to add a summary/introduction for the gallery if images are added. Also, there was this request for help. @szabesz is right - the screen recorder tool is LICEcap. I discovered it via this post by @bernhard. 4 Link to comment Share on other sites More sharing options...
alexcapes Posted November 21, 2016 Share Posted November 21, 2016 @Robin S you're my hero again for this module! Seriously every time I think of something I need in PW you're already on it. 5 Link to comment Share on other sites More sharing options...
planmacher Posted April 6 Share Posted April 6 Hello, is this module still necassary with newest PW ? What ist actually the best way to show a text input field only if an image field ist populated? This image field is set to "single file if populated, null if not". Additional the text input should be "required" if the image field is populated. Any help is appreciated... Link to comment Share on other sites More sharing options...
Robin S Posted April 7 Author Share Posted April 7 On 4/6/2025 at 6:53 AM, planmacher said: Hello, is this module still necassary with newest PW ? Expand I'm not aware of anything changing that would make this module redundant, but it will be easy for you to check and find out. On 4/6/2025 at 6:53 AM, planmacher said: What ist actually the best way to show a text input field only if an image field ist populated? This image field is set to "single file if populated, null if not". Expand When using the Image & File Dependencies module, if your image field is named "image" you would use the selector string: _image>0 Link to comment Share on other sites More sharing options...
planmacher Posted April 8 Share Posted April 8 Thanks for your reply and the module! I will give it a try... Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now