generator-builder
generator-builder copied to clipboard
txtDbValue always hidden
There is a reason why the txtDbValue is always hidden?
This https://github.com/InfyOmLabs/generator-builder/blob/master/views/field-template.blade.php#L29
Should be appended to dbType like for htmlType and htmlValue
I can make a PR to:
-
Make this field .txtDbValue always visible
-
Add in form submit:
// Append db value
var dbType = $this.find('.txtdbType').val();
// if not empty append
if($this.find('.dbValue').val()) dbType = dbType + ':' + $this.find('.dbValue').val()
// ...
fieldArr.push({
name: $this.find('.txtFieldName').val(),
dbType: dbType, // here dbType
htmlType: htmlValue,
//...
And I would like to know about relation for each field as in your fields_sample.json there is for example:
{
"name": "writer_id",
"dbType": "integer:unsigned:default,0:foreign,writers,id",
"htmlType": "text",
"relation": "mt1,Writer,writer_id,id"
},
Right now seem not possible to add relation like this for each field, or am I missing something?