Community
    • Login

    creating a form

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 4 Posters 7.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • FirenlceF
      Firenlce
      last edited by

      Hi I am wondering if it is possible to create a form with locked text.
      I have a template that I use over and over. Currently I have a blank version saved and I have to copy and paste that info to a new note every time I use it in order to add my information to it. I wanted to create a form that locks the text for the blank form in one color and then when you add the information to the form it is in a separate color .
      Does anyone know if this is possible and if so could yo provide me the steps or link on how to do so. Thanks in advance.

      1 Reply Last reply Reply Quote 0
      • cipher-1024C
        cipher-1024
        last edited by

        I’m not exactly a NPP expert, but I’ve never heard of it doing anything with forms, even with a plugin.

        You could do a few alternative things though.

        1. You could add the Python Zen Coding module (I find it to be faster than the Emmet plugin) and learn the key strokes to jump to the next edit point. That doesn’t do any of the locking/coloring you want, but it would make filling in the template easier.

        2. You could make an HTML page with inputs for the things you need to fill out and then have a button to output the completed form to a text box that you can copy.

        3. Do it in Word.

        Sorry, I realize these ideas are a bit of work, but I’m just not sure NPP is the tool you want for this job. Hopefully someone else will chime in with some other ideas but this is all I have for you.

        Good Luck

        1 Reply Last reply Reply Quote 1
        • PeterJonesP
          PeterJones
          last edited by

          If you know Python or Lua, the PythonScript or LuaScript plugins provide an interface which will allow you to write a script to somehow provide a form, and then they could be made to write their results into the active file in NPP.

          Or you could use one of those plugins, or NppExec to pipe the output of any script, executable, etc (so Perl, HTA, VisualBasic, VBScript, compiled C/C++, …) into the active file in NPP.

          Or you could write a plugin (or pay or cajole someone into writing a plugin for you) that allows you to have a fill-out form to populate the new document.

          But, as @cipher-1024 pointed out, forms are not a native part of NPP.

          1 Reply Last reply Reply Quote 0
          • dailD
            dail
            last edited by

            As others have pointed out it isn’t natively supported out of the box.

            That being said it is kind of possible to do what you want with a plugin and/or script. You’d have to write a custom lexer to determine which parts are meant to be locked (depending on the format this may be very easy or complex). Specific Scintilla styles can be “locked”, though supposedly not perfect. The custom lexer could mark and color parts of the form as being locked vs unlocked.

            1 Reply Last reply Reply Quote 1
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors