Copy link to clipboard
Copied
Does anyone know how to increment number with multiple cursors?
Thanks
Copy link to clipboard
Copied
I don't know in what way this would need to involve multiple cursors. It looks like you intend to use javascript to process this, since you are putting the unique identifiers in the id, but I would use PHP and create a two level array in the name field. With checkboxes, I don't think you can use the same name for the whole group, the way you would with a radio group, but you can certainly use an array with names like checkbox[0] or even checkbox[<?php echo $value ?>]
A lot depends on whether or not you know how many checkboxes you will need. I often have them coming from a database set of records where I don't know how many there will be.
Processing the group means your post data will contain a separate array for the checkbox set.
You need to provide more info about what exactly you are doing. There are too many different ways this could go to give you a definite answer based on what we know now.
Copy link to clipboard
Copied
My goal is to increment numbers by 1, don't think about checkbox, imagine regular text in simple html file.
Copy link to clipboard
Copied
This is what I am looking for: http://rricketts.com/add-auto-incrementing-number-selection-sublime-text-3/ or https://github.com/yulanggong/IncrementSelection how to do same in DW CC2017?
Copy link to clipboard
Copied
Interesting. That's a nice feature in sublimetext. There is no similar feature in Dreamweaver (that I know of).
I personally would never use such a feature because I would probably take my list from a database recordset, but I can see how this feature could be useful.
Copy link to clipboard
Copied
This can be done when writing the div tags in DW using Emmett.
Typing the following into the code...
div.item_$*5
...and hitting Tab after would give you the same result as the first block of code you want. Typing the following...
ol>li{$. Text}*5
...and hitting Tab would duplicate the second.
Copy link to clipboard
Copied
I need this on elements which is already exists in html, not the new ones...
Copy link to clipboard
Copied
https://forums.adobe.com/people/Jon+Fritz+II wrote
This can be done when writing the div tags in DW using Emmett.
Typing the following into the code...
div.item_$*5
...and hitting Tab after would give you the same result as the first block of code you want. Typing the following...
ol>li{$. Text}*5
...and hitting Tab would duplicate the second.
Neat, where there's a will there's a way.
Since I mostly now use php based pages I'd just increment the numbers using a variable i++ or you can do it using javascript/jquery.
Copy link to clipboard
Copied
if you press CMD + Option + arrow you increment number by 10
press CMD + Option + Shift + arrow will increment number by 0.1
can't find a way to increment by 1
Copy link to clipboard
Copied
That works to add 10 or .1 to each selected number (changing all 1's to 11's or 1.1's). I believe the OP is looking for a keyboard shortcut style way to change the number on each subsequent selection by 1 higher than the previous, so from...
<label for="option_1">
<label for="option_1">
<label for="option_1">
<label for="option_1">
...to...
<label for="option_1">
<label for="option_2">
<label for="option_3">
<label for="option_4">
...after Ctrl + Selecting with multiple cursors.