• Resolved desmogiec

    (@desmogiec)


    Hello,
    I’ve finished managing a form, a complex one with several conditional logic and a big amount of objects. (the export code is about 500kb)
    I’m in the need to duplicate all of the items 5 times.
    I was looking in the table in sql where the form is stored, but when i edit something the form will erase all the objects previously coded.
    (Maybe a checkshum check or something?)
    Then I looked at the import/export function.
    The main question of this topic is:
    are the objects ids randomly generated?
    If I copy the entire code replacing the id of the object randomly, will it work?
    eg:
    s:10:”wrapper_id”;s:26:”wrapper-1545151657423-1624″
    //
    s:8:”select-1″;s:10:”element_id”;s:8:”select-1″;s:7:”form_id”;s:26:”wrapper-1544809693197-1935″
    that wrapper-xxx-xx and “select-1” can be anything? I mean, i think that those numbers are only to point/recognize the objects, so if the id can be assigned by me randomly, (without any duplicates of course), this will be an incredible time saving operation.

    (sorry for the grammar, english is not my native language!)

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hey @desmogiec,

    1. Perhaps when you edit the form data you break the JSON because number of characters is different after changes.

    s:10:”wrapper_id”;s:26:”wrapper-1545151657423-1624″ s:NUMBER is the number of characters following.

    2. Wrappers IDs are random generated numbers with wrapper- prefix, Fields IDs are incremental by the number of fields by type with prefix field type. You can have any number there, but my suggestion is to stick with incremental, it will be much easier for you to manage submission data later.

    P.S. Both wrappers and fields IDs should be unique! ??

    Let me know if you need further help.

    Best regards,
    Tsvetan

    Thread Starter desmogiec

    (@desmogiec)

    Thanks for the hint!
    I think I will edit the generated export txt and then import it in a new form.
    Editing the sql table just won’t work.
    I did notice that s:xx is the counting of chars, I’ve tried before with the correct number, but didn’t worked. (spaces are counted as chars, didn’t they? “test a” = 6, right?)
    Plus, when I’ve restored the original table the form didn’t restored, fortunately I maked a clone of it.
    So, I think I’ll go with editing the generated export file and then import the modified one, I’ll just change the ids!
    Thanks again!

    Mirko

    Thread Starter desmogiec

    (@desmogiec)

    Hello again.
    I’ve successfully managed to import my custom code, I’ve created a page with the shortid reference and it shows up correctly.
    BUT:
    if I open the form in forminator editor… I see nothing.
    A blank page shows up and I can do nothing.
    Is there a max limit for the number of items used in order to showup in the editor?
    Can I do something for that?

    Thanks

    Thread Starter desmogiec

    (@desmogiec)

    Nevermind, I’ve created a whole new code to be imported and all works great now!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Import (customizing the code)’ is closed to new replies.