-
Posts
1,080 -
Joined
-
Last visited
-
Days Won
17
Everything posted by dotnetic
-
Clapped. Also on Medium ? Thanks for your insights and the PageQueryBoss module looks promising. I think I have a use for it in the near future.
-
I want to create a repeater field via API and add fields to it. I read that there is a property repeaterFields, but when I try to add a field it does not appear in the ProcessWire backend. I put this code into my tracy console: $fields->delete($fields->get('quiz_answers')); $fields->delete($fields->get('quiz_correct_answer')); $repeater = new Field; $repeater->type = wire('modules')->get('FieldtypeRepeater'); $repeater->name = 'quiz_answers'; $repeater->label = 'Answer'; $repeater->repeaterCollapse = 3; $repeater->required = true; $repeater->repeaterAddLabel = 'Neue Antwort hinzufügen'; // $field->parent_id = wire('pages')->get("name=for-field-{$field->id}")->id; // $field->template_id = $template->id; $repeater->save(); $checkbox = new Field; $checkbox->type = $this->modules->get("FieldtypeCheckbox"); $checkbox->name = "quiz_correct_answer"; $checkbox->label ="This is the correct answer"; $checkbox->tags = 'quiz'; $checkbox->save(); //add fields to repeaterFields $repeaterFieldsArray = array(); $repeaterFieldsArray[] = $checkbox->id; $repeater->repeaterFields = $repeaterFieldsArray; $repeater->save(); But when I go and edit the repeater field 'quiz_answers', no field appears at details -> repeater fields. What is the correct way to add one ore more fields to the repeater via API? Maybe @teppo or @adrian could help me out with this, as you both seem to have some experience with repeater fields? Parts of my code are stolen, copied inspired by https://gist.github.com/teppokoivula/8889040 and https://github.com/adrianbj/ProcessAdminActions/blob/master/actions/PageTableToRepeaterMatrix.action.php#L227
-
Just a quick thought: I think it is better and more flexible if you use an options field with autocomplete and "chosen select multiple (extra module)" for the column widths, offsets etc. Right now it looks very cumbersome. Take a look at my screencast at https://screencast-o-matic.com/watch/cF1OY3FYE2
-
☁️ Duplicator: Backup and move sites
dotnetic replied to flydev's topic in Module/Plugin Development
Count me in as a tester. -
Because of that, I use Smarty as my template engine now, because it is closer to the ProcessWire syntax. But in one project I still have to use twig ? Also twig often throws errors, when you try to access a property/variable that isn't defined, but then you can use page["myvar"] instead without getting an error.
-
@tpr Thanks for your suggestion. Yeah I was using a mixup of jQuery and vanilla JS, as my script was vanilla before as I used it outside of the admin. I needed to change your code a lil bit, because the type is a property and not an attribute. The new updated version is attached to my first post now.
-
Get rid of the confirm password field and use an unmasking button instead Many articles like http://uxmovement.com/forms/why-the-confirm-password-field-must-die and recent user studies show, that there are UX problems with a confirm password field. Also there are comments who disagree with this behaviour. An example of a good password field UX is the signup form of MailChimp https://login.mailchimp.com/signup/ Luke Wroblewski from Google also described the problems with masked password fields, especially for mobile users: https://www.lukew.com/ff/entry.asp?1653 Why would the enhancement be useful to users? A confirm password field does not really add verification that you typed your password correctly. Users tend to make the same typing errors again, if they repeat their password. It would be better to use a show/hide password button, so a user can see the password he typed. This would remove friction and frustration. Luke even wrote, that he displays people’s passwords by default in the Polar app. I did not implement this at the time, but think it is a smart move. Maybe I implement it as an option. Fully functional module is ready Right now I have a working InputfieldPassword to use with AdminThemeUikit. Here is a video of the new Inputfield in action: https://youtu.be/PEWp89TOUsU It would be nice if you vote for this feature request on github if you think it is useful. You can download the module here. InputfieldPassword.zip
- 6 replies
-
- 10
-
-
@Pete This happens often to me ?
-
Hello @Sten So what exactly is the problem? Don't you get any output? What happens? What is you path to templates in the config of the module? I have /templates/views and with my twig files in this directory everything works fine. Did you choose twig as the template files suffix? Your code and extend seem to be correct. The global template file field has to be empty so you can work with extends like you do
-
Preview/Discussion: RockDataTables
dotnetic replied to bernhard's topic in Module/Plugin Development
@bernhard Ever heard of Release early, release often ? -
Get all pages of template created this month?
dotnetic replied to onjegolders's topic in General Support
2018 update: You can also use strtotime in selectors since a while (don't know in wich PW version, but it works in versions > 3. So you could do: $pages->find('template=invoice,created>"first day of this month",created<"last day of this month"')) -
Preview/Discussion: RockDataTables
dotnetic replied to bernhard's topic in Module/Plugin Development
It's getting better and better. Love it, -
Delete web by mistake and I need to recover it
dotnetic replied to colinosoft's topic in General Support
Hello @colinosoft. Normally your hosting company should have backups of files and databases available. Please provide more info of what exactly you did. Did you remove files via FTP, SSH? Did you ask your hosting company for a backup? -
Module: Video embed for YouTube/Vimeo (TextformatterVideoEmbed)
dotnetic replied to ryan's topic in Modules/Plugins
@tires The pull request is here https://github.com/ryancramerdesign/TextformatterVideoEmbed/pull/12 -
Module: Video embed for YouTube/Vimeo (TextformatterVideoEmbed)
dotnetic replied to ryan's topic in Modules/Plugins
I am planning to make a PR on github the next few days, in the meantime you could download my version of the module, as soon as I release it on github. Will notify you here. -
Module: Video embed for YouTube/Vimeo (TextformatterVideoEmbed)
dotnetic replied to ryan's topic in Modules/Plugins
I did the same for the TextformatterVideoEmbed module. Also added an option to it, if you want to use the nocookie domain or not. -
Preview/Discussion: RockDataTables
dotnetic replied to bernhard's topic in Module/Plugin Development
This is so great ? -
I come from the future and have to tell you ProcessWire is here to stay @gebeer My sync is not connected to git, I am planning to do so, but you know... missing time. I send you the rsync shell script via DM.
-
@wbmnfktr Thanks for the compliments. Regarding your question: It might be good to make an own thread for this. But to give you an answer: If there is some sensitive data in the case study, I ask my customers if it is okay, to have that data in the study. If not, I remove it. And sensitive data in the backend is replaced with dummy data or blurred, because if not, it could conflict with the law (regarding your country).
-
I am tracking the changes from the beginning with your module, and want to query the markupactivitylog table for the first entry a specific field named "status" (not processwires status) was changed at first.
-
@Zeka I added the link to my article. Thanks again.
-
In the beginning of the year, I relaunched the website of P. Jentschura and it took some time to publish the case study for it, but here it is (only in german atm, but you could use a translator tool). Wie wir P. Jentschura halfen, die Conversion Rate zu erhöhen, neue Interessenten zu gewinnen und eine Erfolgsmessbarkeit einführten. Translated title: How we helped P. Jentschura to increase the conversion rate, win new customers and measure success. I plan to publish the case study in english also, but it could take some time.
-
Preview/Discussion: RockDataTables
dotnetic replied to bernhard's topic in Module/Plugin Development
Hey @bernhard any updates on a release date or progress with RockDataTables? RockFinder repo at gitlab even mentions, that you renamed it to RockGrid?! I can't wait to get this module into my hands. -
Hey @renobird, is it possible to get the first date a specific field was changed? How would I do this? Any suggestions?
-
Preview/Discussion: RockDataTables
dotnetic replied to bernhard's topic in Module/Plugin Development
Ok, here you go. It's simple. Create two files in your root directory gulpfile.js var concat = require('gulp-concat'); var uglify = require('gulp-uglify'); var gulp = require('gulp'); var jsFiles = 'lib/**/*.js', jsDest = 'dist/'; gulp.task('scripts', function() { return gulp.src(jsFiles) .pipe(concat('scripts.js')) .pipe(uglify()) .pipe(gulp.dest(jsDest)) }) gulp.task('default', ['scripts']); Please change the paths to your javascript files according to your needs. In my example every .js file under "lib" and its subdirectories are catched. You can also change the jsDest. This is where the concatenated file "scripts.js" will be stored. Create a package.json { "name": "gulp-simple-concat", "version": "1.0.0", "description": "", "main": "gulpfile.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC", "devDependencies": { "gulp": "^3.9.1", "gulp-concat": "^2.6.1", "gulp-uglify": "^3.0.0" } } Then run npm install Node.js has to be installed for this to work. But it is very common now for web-devs to have this installed. When npm is finished, just run `gulp`in your console/terminal. That's it. Now you have a concatenated and minified javascript file.